Skip to content

Commit

Permalink
hotfix for radio
Browse files Browse the repository at this point in the history
  • Loading branch information
KoljaWindeler committed Apr 20, 2021
1 parent 92906f5 commit 99e717b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion custom_components/ytube_music_player/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@
"codeowners": [
"@KoljaWindeler"
],
"version": "0.20210420.01"
"version": "0.20210420.02"
}
6 changes: 2 additions & 4 deletions custom_components/ytube_music_player/media_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -1141,10 +1141,8 @@ async def async_play_media(self, media_type, media_id, _player=None, **kwargs):
crash_extra = 'get_library_upload_songs(limit=999)'
self._tracks = await self.hass.async_add_executor_job(self._api.get_library_upload_songs,999)
elif(media_type == CHANNEL):
if(media_id=="LM"):
media_id = "PLLM"
crash_extra = 'get_watch_playlist(playlistId=RDAM'+str(media_id)+')'
self._tracks = await self.hass.async_add_executor_job(lambda: self._api.get_watch_playlist(playlistId="RDAM"+str(media_id)))
crash_extra = 'get_watch_playlist(playlistId=RDAMPL'+str(media_id)+')'
self._tracks = await self.hass.async_add_executor_job(lambda: self._api.get_watch_playlist(playlistId="RDAMPL"+str(media_id)))
self._tracks = self._tracks['tracks']
self._started_by = "UI" # technically wrong, but this will enable auto-reload playlist once all tracks are played
elif(media_type == USER_ALBUM):
Expand Down

0 comments on commit 99e717b

Please sign in to comment.