Song request system v1.2 (YouTube Music)

Description

Me and @virtualbober wrote song request provider for Twitch
Using API from th-ch for YouTube Music App

Video Tutorial (for v1.1)

For v1.2 only this guide for now :backhand_index_pointing_right::backhand_index_pointing_left:

Import File

Patreon page (free)

Resources

YouTube Music App

Installation

First Step

Open YouTube Music releases
Download version (tested on 3.8) by clicking on .exe file like on the gif below

Step 2

  • Run application

Step 3

  • Authorize by Google account

Step 4

  • Create a playlist with one song (example on the gif below)

3bva9aqmwm5o7e4bjkgz

Step 5

Then make sure that you run API Server with No authorization (like on the gif below)

q8hcrpomvogjfu122399

Step 6

Then in Streamer.bot click the Import button in the top menu. Drag the .sb file into the Import String field.

Step 7

Then go to Commands and Enable group or what you prefer the most

Step 8

Start playing your playlist

Step 9

Run any of this commands to test if needed

!addsong for example:
vujp4vdzcpaididwrnqa
It will be in english ofc

Configuration

Choose your OBS here:


and here:

Choose path to your YouTube Music.exe to run it automatically

I suggest to use it with “Resume last song option” to have smooth start

Abbilities

You can use it as channel point reward (if you are affiliate)
I made a template trigger to save couple of seconds for you :sweat_smile:
I made icons as well: Patreon page (free)

Also you can adjust who can use it and when

And if it’s a lonely stream you can always turn on Auto-play to have backup music

Filter artists, song names, channel names

From v1.2
:brain: Automatically removes duplicates and songs longer than 10 minutes
:brain: Supported with chat messages (but gently, no spam)
:brain: Removes URL messages after order

Commands

Current version 1.2 has abilities:

!addsong {song name / youtube url} - add song by name or Youtube URL
!pause - turn off currently playing song
!play - turn on currently playing song
!skip - skip to the next song (aka !next)
!songinfo - post message in Twitch chat about current song
in format {user} Now playing: {title} from {artist}
!wrongsong - delete last added song, even if it’s !addsongprio
!queue - show songs queue (5 by default with current one)

(Expected to be using by VIPs and Subscribers as a privilege and Moderators as a tool)

!addsongprio {song name / youtube url} - add song after current in queue by name or YouTube URL
!playagain - start playing song again (return current play position to an 1 hour before)
!playnow {song name / youtube url} - add song and start playing it directly by name or YouTube URL
!reminder - Toggle chat reminders to request songs

Contributors

@vbagnet @virtualbober

Known issues

!shuffle - doesn’t work because of YouTube Music bug :lady_beetle:
Made a report, when they will fix - I will update

More in details I wrote articles but it’s in Ukrainian :grinning_face: :ukraine:

4 Likes

Works well thank you!

1 Like

It would be in the next version, soon :love_you_gesture:
thank you a lot :heart:

Hey, thanks for the extension! I’ve been developing this exact same integration by myself with the help of chatgpt, but it seems I won’t need that buggy mess anymore lol

1 Like

I will build for the next versions:

1.2
Filter:

  • Based on artist for !addsong (remove from queue + message)
  • Based on duration for !addsong (10+ minutes seems to unfair)
    // All can be changed ofc :grinning_face_with_smiling_eyes:

Notification:

  • Song added successfully (with place in queue)
  • “Please use !addsong” (based on duration of queue)

Feature:

  • !wrongsong (which will remove last or by name)
  • !queue (send titles inline)
  • !reminder (toggle reminders)

1.3
Platforms

  • Support YouTube chat

Common

  • Song request limits per user
  • Visual queue overlay

File I/O

  • Save queue between stream in file
  • Add songs in queue from file

Skip

  • Poll for song skip
  • Skip limits per user / stream
1 Like

Hello! Are you still working on this? If you don’t have time to continue, I’d like to implement the missing features, if you allow it!

2 Likes

This works great and really improved my streams! It was super simple to get working unlike other extensions I tried!

2 Likes

This looks really promising as it is exactly what I’ve been looking for for a very long time. I hate using external bots for things and like to keep everything within streamer.bot when I can and this has basically been the last piece for me. The only thing I’m not really seeing which would be amazing is if we are able to have a playlist of many songs that we like in it that play on stream, and then song requests would be moved to the top of that playlist so that they would be played next, then when song request run out it would go back to the regular playlist. Would be the cherry on top for me, but I think I will be using this method regardless for now. Great work!

1 Like

Hi! Not active right now, doing a lot of things at the same time :upside_down_face:
Missing features…, do you mean YouTube support?
You welcome to fork from it :fork_and_knife:
I updated the previous comment with my ideas for development :wink:

I’ll do it at my pace,
full time job need me for some time currently :smiling_face_with_tear:
will update this post as soon as it will be done :wink:

@Bacon

Do my best, glad to hear that it’s simple to use,
I had doubts that it looks simple :sweat_smile:
It was my pain as well and now keep adding features.
Hopefully 1.3 will be balanced with all plans for it,
otherwise you have stable 1.2 :new_moon_face:

@raftortv

Not sure that I’ve got you right.
Do you mean request a playlist,
which will be replaced by default playlist when runs out? :thinking:

This is great! Only problem I’ve noticed is I can’t use my 6K Labs Widget that shows what song is playing, it requires me to use a specific version of the YTM Desktop- so I can’t have both song requests and my now playing widget.

Never mind actually, I just needed to enable the “Amuse” plugin. Hope this helps anyone else!

1 Like

Thanks!
I’ve got some small ideas for a better user experience, and probably will be working on those soon, such as implementing a !replacewrongsong (by keeping a list of the songs found on search) and giving the user some feedback on the real name of the song found by the extension on the !addsong command, so they know beforehand if the song found is the correct one.
If possible, I’d also like to implement some automatic way to create a playlist and add the request song to it if none is playing now. Because if I play an music album I’d need to stop it and start the playlist manually before users can request any songs.
I think that’s it for now. This extension is working wonderfully for me, and I just want to get some quality of life stuff, really.

1 Like

So I’m kind of a noob, but i got this working. however, I’m struggling on what some of the commands do, or how they work. does addnext song always make it the NEXT song, like not adding it to the queue? also also, if my music is paused, and someone uses !addsong, itll start playing on its own, and im unsure how to fix

1 Like

addnext adding the song next (after the current one) to the queue:
r416k5f0ukru6s8xmtwu

If you want to keep it paused - comment these lines on both actions


image

1 Like

I meant more like the streamer having their own playlist playing in the background instead of having an empty playlist for the song requests to go to. I kind of found a way around it with using the “add next song” action which does add the song to play next when you have a playlist playing already, but it would be nice to be able to have those songs queue correctly in that case. The “add next song” action moves the song request to the top of the queue but I’d like it to instead move it to the bottom of the queue of requested songs while staying ahead of my normal playlist, if that makes sense.

Basically, if I have my own playlist playing while I’m streaming, and someone requests a song with the normal “add song” action, it would add that song to the playlist but would play after all the songs in my playlist are played first. the “add next song” action mostly solves that, but it seems that the streamer.bot code moves the last requested song to the top of the queue instead of the bottom. I would just like an option to change that, I guess. If there is an option to change that and I missed it, I appologize.

Add Streamdeck plugins. And add hot keys

Hi Ive been using your extenstion and loving it but I’m having an issue because duplicates have been getting through and im not sure what to do. The !next feature has also been intermittent giving a message of “Empty queue, paused” and the !queue feature gives back a message of “Songs in queue: (1): 1. Невідома пісня”. Its almost as if its reading from a different queue somehow. I deleted my extra versions of YTM tho none have been running. Ive scrolled through the code and saw the commented out section to let dupes through I even removed those comments and readded them back. Ive tried several versions of YTM (3.7.1, 3.8, 3.8.1) both the web install and standalone version. I tried changing the port as well.

In my limited programming knowledge it feels like these issues are all one, the queue isnt working therefore none of the others are. I dont know enough to fix it or if the API changed minorly if anyone else does or is having the same issue id like to hear a way to fix it

1 Like

works well, waiting for youtube live chat support! (currently im using it for youtube live chat, the function to add music works just fine, but the bot doesnt respond in chat)

Works okay, but I really miss option to allow mods to change volume of song request