mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Remove Spotify scope check (#123545)
This commit is contained in:
parent
e1336a1975
commit
5b6bfa9ac8
@ -31,7 +31,7 @@ from homeassistant.util.dt import utcnow
|
||||
|
||||
from . import SpotifyConfigEntry
|
||||
from .browse_media import async_browse_media_internal
|
||||
from .const import DOMAIN, MEDIA_PLAYER_PREFIX, PLAYABLE_MEDIA_TYPES, SPOTIFY_SCOPES
|
||||
from .const import DOMAIN, MEDIA_PLAYER_PREFIX, PLAYABLE_MEDIA_TYPES
|
||||
from .models import HomeAssistantSpotifyData
|
||||
from .util import fetch_image_url
|
||||
|
||||
@ -138,10 +138,6 @@ class SpotifyMediaPlayer(MediaPlayerEntity):
|
||||
entry_type=DeviceEntryType.SERVICE,
|
||||
configuration_url="https://open.spotify.com",
|
||||
)
|
||||
|
||||
self._scope_ok = set(data.session.token["scope"].split(" ")).issuperset(
|
||||
SPOTIFY_SCOPES
|
||||
)
|
||||
self._currently_playing: dict | None = {}
|
||||
self._playlist: dict | None = None
|
||||
self._restricted_device: bool = False
|
||||
@ -459,13 +455,6 @@ class SpotifyMediaPlayer(MediaPlayerEntity):
|
||||
) -> BrowseMedia:
|
||||
"""Implement the websocket media browsing helper."""
|
||||
|
||||
if not self._scope_ok:
|
||||
_LOGGER.debug(
|
||||
"Spotify scopes are not set correctly, this can impact features such as"
|
||||
" media browsing"
|
||||
)
|
||||
raise NotImplementedError
|
||||
|
||||
return await async_browse_media_internal(
|
||||
self.hass,
|
||||
self.data.client,
|
||||
|
Loading…
x
Reference in New Issue
Block a user