YouTube Music Requests and Controls

Description

Allow viewers to add song requests to YouTube music via either command, or channel point redeem.

Video Tutorial

Required Downloads

Import Code

Mustached_Maniac YouTube Music Requests and Controls.sb (33.7 KB)

Setting it Up

  1. Sign Into YTM Desktop App

  2. Create a New Project at console.cloud.google.com.

  • Enable APIs and Services
  1. Create Credentials
  • Under OAUTH CLIENT

    • Create a Web Application
    • Redirect URIs:

    http://127.0.0.1:1444
    http://localhost:1444

  • Create Credentials and Copy down the following:

    • API Key
    • Client ID
    • Client Secret
  1. Go to YouTube Music

    • Create a new playlist, I recommend you make it ‘Private’
    • Copy the Playlist ID after you create it
  2. Import Code into Streamer.bot by dragging the downloaded file into the Import String box, as depicted.

You will get 22 ACTIONS, 19 COMMANDS, and 1 TIMED ACTION

  • Ensure you click on the Commands Tab and Enable them after import!

  1. Open the YTM Desktop App and click the :gear: Icon in the Top Right corner
    • Then press Integrations
    • Press the button to Enable Companion Server
    • Press the button to Enable Browser Communication
    • Press the button to Enable Companion Authorization

How to Initialize

  • Go back to streamer.bot and paste the following in their respective argument:

    • Client ID
    • Client Secret
    • API Key
    • Playlist ID

  • Once updated, ensure you click Save at the top of Streamer.bot, open up your chat, and type the command !ytmSetup

During this process, you’ll get a pop-up window in your web browser warning you that the application is unverified, click continue anyways and authorize the app. Once you see the screen with my face on it-close out of your browser. Additionally, YTM Desktop App will give a pop-up with an authorization code, you DON’T need to copy that one either-just close out the window.

You will have to go into the Execute Code Sub-Actions for YouTube Music Set-Up, YTM Auto Runner, YTM Controls, and OAuth_Token_Swap and press the Find Refs button and then Press Compile. Ensure you get a ‘Compiled Successfully’ message in each one before continuing. See example below

SPECIAL NOTE: The items that add to the playlist will be played automatically, as long as that playlist is playing. If it switches over to auto-generating music and you get another request, you’ll manually have to click on your playlist again in the app!

Setting up the Auto Runner

The Auto Runner is what checks for the currently playing song and updates the song information since most of the media on YouTube Music doesn’t come with that information. It saves them as global variables under ytmAlbumArt, ytmAlbumName, ytmArtist, and ytmSong.

  1. On the YTM Auto Runner Action, Right-Click on the trigger and enable it
  2. Go to the Settings Tab and then click Timed Actions and Right-Click to Enable YTM Auto Runner

Available Controls

Command Controllable Feature Description
!ytmDislike Dislike Dislikes the currently playing song.
!ytmLike Like Likes the currently playing song.
!ytmMute Mute Mutes the YTM Player, but doesn’t pause.
!ytmUnmute Unmute Unmutes the YTM Player.
!ytmPause Pause Pauses the YTM Player.
!ytmPlay Play Resumes playing the YTM Player.
!ytmPrevious Previous Restarts the currently playing song.
!ytmSkip Skip Skips the currently playing song.
!ytmQueue Queue Lists all the songs on the current playlist.
!ytmUpNext Up Next Lists number of songs in queue and next up.
!ytmSong Song Displays current song’s Title and Artist.
1 Like

Obviously don’t need these sections :wink:

I’ll try and do some more looking into this over the weekend but just know your OAuth code hurts my soul. :rofl:

Got rid of it and moved the Import Code up higher. Also re-uploaded the Import Code eliminating all Using Http and changing them to private classes that are properly disposed of…it learns!

Just a quick note, I watched your video tut and I noticed that adding songs into the playlist actually puts the song #1 into last position etc…

I will test import and functionality in comming days and come back with results.

1 Like

I appreciate that observation. I’ve actually got to update the import code here anyways. It’s been here for awhile and I didn’t expect it to make any movement so have been slacking on updating it. Additionally, I’d like to attach the .exe directly since the GitHub link no worky anymore…can I DM it directly to you via Discord?

Regarding DM’s on discord, I have them open, so feel free to spam me with any kind of shit. BUT, sending files is always a no no, security-wise.

I dunno what happened with GH repo you showed on video, but I would suggest to either start your own repo and share that .exe there and point your link at that or find other similar solution (and I mean in long term now).

Also please give credit to whoever made/tweaked that app, if there is anyone (guessing here, but is it just tweaked original YTM app by some random person?).

It’s from the original YTM Desktop app that was supposed to go into production before the GH got taken down. Specifically, it was the Release Candidate #5 for a version 2 of the actual app.

Their website is still alive, YTM Desktop App, but all download links point to the derailed GH. There are a multitude of other variants out there, but I built the extension to work specifically with this one as it provided the most user-friendly install and use lol.

I unfortunately didn’t run a branch before it disappeared so if I put it back on GH, it would purely be as a means to hold the .exe, but not have any of the repositories, source code, etc

From the website you linked, this > https://adlerluiz.com/ < is the developer of YTM personal site, maybe reach to them? They also state there, that their project is in no way affiliated with Google etc.

I’m aware it’s not affiliated with Google. I should’ve used quotations with “official” YTM Desktop app lol. It’s the “most commonly used” version would’ve been better wording. I’ll reach out to the name listed and see if I can get any sort of better answers/resolution. As well as look at alternative means. This project currently works as-is, but if you’d rather wait to test it until I pick it back up and change apps-then that’s fine by me.

I appreciate your time and help regardless!

I think it is better to get working solution longterm now with all dependencies before approving it as official extension. So I will test it once all puzzles are in place.
Hope you find solution without any major issues, since it seems like you already put a lot of time into this integration!
Best of luck!

1 Like

May get lucky with wayback machine as well. It’s what I had to do for one repo and @pwnyy had to track down the exe until I basically coded my own program to do the same thing the repo that got nuked did lol

1 Like

ahhhhh, why didn’t I think of that! Great idea!