mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 17:57:11 +00:00
Don't requests known Spotify playlist (#66313)
This commit is contained in:
parent
768de8d515
commit
57624347e6
@ -378,10 +378,13 @@ class SpotifyMediaPlayer(MediaPlayerEntity):
|
|||||||
current = self.data.client.current_playback()
|
current = self.data.client.current_playback()
|
||||||
self._currently_playing = current or {}
|
self._currently_playing = current or {}
|
||||||
|
|
||||||
self._playlist = None
|
|
||||||
context = self._currently_playing.get("context")
|
context = self._currently_playing.get("context")
|
||||||
if context is not None and context["type"] == MEDIA_TYPE_PLAYLIST:
|
if context is not None and (
|
||||||
self._playlist = self.data.client.playlist(current["context"]["uri"])
|
self._playlist is None or self._playlist["uri"] != context["uri"]
|
||||||
|
):
|
||||||
|
self._playlist = None
|
||||||
|
if context["type"] == MEDIA_TYPE_PLAYLIST:
|
||||||
|
self._playlist = self.data.client.playlist(current["context"]["uri"])
|
||||||
|
|
||||||
devices = self.data.client.devices() or {}
|
devices = self.data.client.devices() or {}
|
||||||
self._devices = devices.get("devices", [])
|
self._devices = devices.get("devices", [])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user