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:...'
pull/37862/head
Adam Liddell 2020-07-14 19:37:08 +01:00 committed by GitHub
parent 7d77fa92c2
commit c3f63e0739
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -167,7 +167,7 @@ class SpotifyMediaPlayer(MediaPlayerEntity):
def media_content_id(self) -> Optional[str]:
"""Return the media URL."""
item = self._currently_playing.get("item") or {}
return item.get("name")
return item.get("uri")
@property
def media_content_type(self) -> Optional[str]: