Skip to content

Add to playlist

Compare
Choose a tag to compare
@KoljaWindeler KoljaWindeler released this 05 Jul 11:26
· 203 commits to main since this release

Feature

Added new service 'add_to_playlist'.

I mostly listen to music in channel mode. That mode is pretty much the same as the radio feature of youtube music. You have to provide a playlist ID and the player picks a random track of that playlist and creates a radio based on that title. That way you get a nice playlist that is just right for the mood.

My issue was that every once in a while I listen to a really nice song that I didn't knew before. Sure I could open my YTube Music app on the phone, search for the song and add that song to the particular playlist .. but honestly ... I rarely did that. So my playlists sadly never evolved.

This new service is here to change that. It can directly be called without further arguments to add the current track to the current playlist.

You can however also override the playlist or song by providing a dedicated id:

service: ytube_music_player.add_to_playlist
data:
  entity_id: media_player.ytube_music_player

adds the current song to the current playlist (so you have to have the player in channel mode)

service: ytube_music_player.add_to_playlist
data:
  entity_id: media_player.ytube_music_player
  song_id: eCpt2qaqKW0

adds a specific song to the current playlist (so you have to have the player in channel mode)

service: ytube_music_player.add_to_playlist
data:
  entity_id: media_player.ytube_music_player
  song_id: eCpt2qaqKW0
  playlist_id: PLZvjm51R8SGuNroyDal3v9BYdTw6yqrrM

adds a specific song to a specific playlist (can be called in any mode)