mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
Fix media_content_id attribute in Spotify integration (#37853)
Previously, the media_content_id field would contain the track name, which appears was a regression when the Spotify integration was rewritten in 7e4b9adc. The media_content_id now reverts to containing the Spotify track 'uri' field, which has the form 'spotify:track:...'
This commit is contained in:
parent
7d77fa92c2
commit
c3f63e0739
@ -167,7 +167,7 @@ class SpotifyMediaPlayer(MediaPlayerEntity):
|
|||||||
def media_content_id(self) -> Optional[str]:
|
def media_content_id(self) -> Optional[str]:
|
||||||
"""Return the media URL."""
|
"""Return the media URL."""
|
||||||
item = self._currently_playing.get("item") or {}
|
item = self._currently_playing.get("item") or {}
|
||||||
return item.get("name")
|
return item.get("uri")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def media_content_type(self) -> Optional[str]:
|
def media_content_type(self) -> Optional[str]:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user