pathofleastresistor / polr-ytube-media-card

26 stars 3 forks source link

Go to track #5

Closed KoljaWindeler closed 6 months ago

KoljaWindeler commented 6 months ago

hi, I've seen that I can start a playlist and then select a different track in the playlist by clicking on the "play" arrow. The playlist will stay the same and the playback will continue.

If I start a album I also see the playlist. Clicking on a track of the playlist here will lead to a jump to this track but also clear the playlist (well reduce it to this single entry).

do you use this service

target:
  entity_id: media_player.ytube_music_player_2
data:
  media_content_type: PLAYLIST_GOTO_TRACK
  media_content_id: "3"

or are you sending websocket commands? I realized that i can not jump to any entry in the playlist when using the media_browser Any idea?

pathofleastresistor commented 6 months ago

Oh good catch - today I check if media_content_type == "PLAYLIST_GOTO_TRACK" and then issue a service call accordingly.

https://github.com/pathofleastresistor/polr-ytube-media-card/blob/0ea126acdc3eed7bf181b3fd1c979df63f5b643d/src/elements/polr-ytube-list.ts#L163

pathofleastresistor commented 6 months ago

I checked when an album is loaded, it does appear to set the media_content_type to track.

{
    "title": "Wide Open",
    "media_class": "track",
    "media_content_type": "track",
    "media_content_id": "ot2hQwR9V5w",
    "children_media_class": null,
    "can_play": true,
    "can_expand": false,
    "thumbnail": ""
}
pathofleastresistor commented 6 months ago

Whoops I was wrong - I fixed it here https://github.com/pathofleastresistor/polr-ytube-media-card/commit/c912a6311c6b7253b31f12b5e1a376745ba7ec12

pathofleastresistor commented 6 months ago

Fixed in v1.5.2