Skip to content

Commit

Permalink
fix for api 12.1 changes
Browse files Browse the repository at this point in the history
  • Loading branch information
KoljaWindeler committed Dec 17, 2020
1 parent c4fb9de commit 2552379
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/ytube_music_player/media_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ def _load_playlist(self, playlist=None, play=True):
if _source.state != 'Playlist':
r_track = my_radio[random.randrange(0,len(my_radio)-1)]
try:
self._tracks = self._api.get_watch_playlist(videoId=r_track['videoId'])
self._tracks = self._api.get_watch_playlist(videoId=r_track['videoId'])['tracks']
except:
self._api = None
self.exc(resp="ytmusicapi")
Expand Down Expand Up @@ -860,4 +860,4 @@ def exc(self, resp="self"):
_LOGGER.error("and paste the following output:\n")
_LOGGER.error(traceback.format_exc())
_LOGGER.error("\nthanks, Kolja")
_LOGGER.error("============= ytube_music_player Integration Error ================\n\n")
_LOGGER.error("============= ytube_music_player Integration Error ================\n\n")

0 comments on commit 2552379

Please sign in to comment.