Youtube Music - Media Browser

Hi Everyone, i need your help please. I followed the installation steps and all working as expected, e.g. i can use mini-media-player to browse through my YouTube music library and i can select album and play on my default device.
The only issue Iā€™m facing is, canā€™t play playlist. i can see my playlists available but when select one of them it doesnā€™t play. any suggestions please? thanks.

Hi All, i managed to find the issue, i did copy the wrong request header value.

In my case i have 2 request header values. everything worked fine including the playlist once i used the second request header, see screenshot below.

image

FYI, you have 1 Request Header and 1 Response Header

Hi @JKW, first of all thank you for this awesome integration. Its my most used integration and one iā€™m spending the most time trying to get perfect in my current Lovelace redesign.

This question probably isnā€™t related to this integration specifically, however thought i would ask here incase there is some sort of magic in the player that could help achieve what Iā€™m looking for.

Does anyone know if its possible to embed the Media browser library from home assistant be used as a card within love lace, or as a pop up?

my use case is i currently have a ā€œmediaā€ view which has multiple mini-media player cards that i have on some tablets around the house & using the mini-media player shortcuts i can select the players and have a conditional card for individual google cast audio players volumes.

Where i am having issues is with my ā€œplaylistā€ section in the screenshot below. My current solution has been to get the ID for every playlist i have in my library and use a grid of picture cards within a custom swiper card and tap to call a service to the media player to change the playlist.


while this works, its a lot of coding and if i add a new playlist i need to go and this new playlist to the list of cards and maintain.

What i would love to be able to achieve is have the dynamic nature of the media library be usable as a card, so i dont have to hard code my inputs. Iā€™m also using the playlist select drop downs in a popup to help with this, however having the cards would be taking it to another level.

Particularly now there is a ā€œsearchā€ service in the player, the use case is even more valuable. Ideally i would love to have a text input field to call the search service and then have the results available in the pop-up or card even better just show the grid of results the same way as the current media browser.

Iā€™ve tried to use an imbedded ā€œiframeā€ card (see below), however this isnā€™t great as i cant seem to hide the header with kiosk mode, and the iframe doesnā€™t like working on some of my devices.

image

If anyone has been able to come up with something similar that i could try that would be amazing.

2 Likes

just to give you feedback (although it isnā€™t the feedback you want): no :smiley:
I agree that a media_browser card would be awesome but I didnā€™t find one.

Or maybe something like a card that just needs the ID and loads the Icon and provides the call service ā€¦ but again ā€¦ nothing found and Iā€™m really no javascript/frontend programmer

JKW

edit: very very nice interface ā€¦

1 Like

iframe was my first thought which I come up with and with some fiddling around via browser dev tools it seems like it should be possible to get rid of it. So iframe and card-mod is probably one possible route. :thinking:

Love your dashboard as well :heart_eyes:

Thanks for responding. I did see you ask a similar question back in 2020 on the media_browser community thread, so thought this was the case :smiley: . Iā€™m in no way any form of coder, but have slowly been learning by unpicking a lot of others integrations and dashboards.

I was thinking if its possible to leverage the API which returns the images from youtube for album art and and also pick up the playlist ID like you said, but this is way over my limited understanding of whats possible.

For now im going to play around with Card-mod and a pop-up as @Nath recomends below. Not sure how to hide elements using cardmod just yet, but im sure some googling will prevail :slight_smile:

Hi, Iā€™ve released a new version that might help to enhance your playlists with new music

3 Likes

New released version of today Release Added: Moods & Genres Ā· KoljaWindeler/ytube_music_player Ā· GitHub now supports moods & genres in the media_browser

Cheers JKW

1 Like

@JKW did you see that 2021.7 now has official support for select basically input_select for integrations.

I saw that, yes. But didnā€™t really get the point. It was already possible to fill an input_select from a component, which is what I do for the playlists. So where is the benefit?
Jkw

New release of today Release Further Media_browser enhancements Ā· KoljaWindeler/ytube_music_player Ā· GitHub which enhances the media_browser by adding two new buttons:

  1. Playback device ā†’ directly select the output device (alternativ to the input_select)
  2. Current playlist ā†’ shows current list with the option to directly jump to another track (keeps the playlist)

Now we really need a lovelace card to show the content of the media_browser embedded on the frontend :nerd_face:

JKW

3 Likes

We are getting so close! Amazing work as always JKW.

Do you think this would become an official integration in the future?

1 Like

Hello, thank you for your work and efforts to support this integration.
This integration really becomes very user-friendly. I have one question.

I only listen to my uploaded music. I am not using a subscription, because the subscription does not have the content I need.

Please tell me, many of my youtube music playlists usually have more than 100 tracks. Many albums also contain over 100 tracks. But I only have 100 tracks displayed. And there is no way to go beyond this line.
If I select, for example, the 118th track in the media browser, then the player plays only this track and cannot go to the next one.
The rewind and forward buttons also stop working.

Is there any way to get around this limitation?

sure
go to configuration ā†’ integrations ā†’ ytube_music_player, click configure ā†’ check ā€œshow advance configurationā€ ā†’ change ā€œlimit of simultaneously loaded tracksā€ to your desired value
JKW

1 Like

Actually todayā€™s release is a bit related to the last question: Limits!

20210720.01 adds two limits: A request limit and a user limit.

??:confused:??

The request limit can be configured as discuessed above:
go to configuration ā†’ integrations ā†’ ytube_music_player, click configure ā†’ check ā€œshow advance configurationā€ ā†’ change ā€œlimit of simultaneously loaded tracksā€ to your desired value

This request limit is now used for all api calls and will likely make request slower for most of you :frowning:
The reason is that the request limit had a default value of 99 and all previously release versions ignored the limit for most calls and simply called the api with the default value 25.

So you should either go to the configuration and adjust your default value from 99 to 25 or be happy about longer playlists. :smiley:

The user limit is another animal. This is disabled by default, but can be set by calling

service: ytube_music_player.limit_count
data:
  entity_id: media_player.ytube_music_player
  limit: 3

This will limit the amount of tracks that will be loaded into your playlist.

??:confused:?? still confused because both limits sound the same?

Actually that is true for a straight playlist / album.

But not for a shuffled playlist: Setting the request limit to 3 will always give you the first 3 items of your playlist in shuffled order. But leaving the request limit higher and set the user limit to 3 will give you 3 random tracks of your playlist.

Thats actually the reason why I needed that feature. My kids are allow to listen to 2 good-night-stories, picked randomly out of a longer playlist. As of now I had to stop playback after the 2nd track (and frequently missed that). Now my automation will simply enable the limit function ahead of playing the tracks.

JKW

Hi,

If i play to a group of speakers and any of them go unavailable the player just stops. Any way to ignore a speaker unavailable status and continue to play to the others?

hmm could you enable debugging (GitHub - KoljaWindeler/ytube_music_player: YouTube music player for homeassistant) and copy a log snipped once one device disconnected?
Iā€™m not sure how homeassistant reacts on disconnected parts of a group and what the new group state would be
JKW

Hey Kolja,

Great app, I use it all the time.

Do you know is there a way to exclude speakers from the speakers list? I have some universal media players I created for volume control and donā€™t need them showing up in the pull down.

Thanks!

1 Like

Hmm yes, sort of.
You can select multiple players in the configuration of the integration. That should reduce the list from all media players down to those selected.

The drawback is that youā€™d have to select your output after a restart (I think itā€™ll take the first of the list as default after start)

Jkw

1 Like