mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Fix for iTunes media player not updating artwork (#12089)
* Added timestamp at the end of the iTunes API URL from where HA retrieves the artwork, so that it's not cached, as the URL exposed by the API never changes * Rearranged imports according to pylint * Added content_id in media file URL instead of timestamp, according to Paulus' suggestion
This commit is contained in:
parent
4c11a3461f
commit
6174c1754b
@ -284,7 +284,7 @@ class ItunesDevice(MediaPlayerDevice):
|
|||||||
"""Image url of current playing media."""
|
"""Image url of current playing media."""
|
||||||
if self.player_state in (STATE_PLAYING, STATE_IDLE, STATE_PAUSED) and \
|
if self.player_state in (STATE_PLAYING, STATE_IDLE, STATE_PAUSED) and \
|
||||||
self.current_title is not None:
|
self.current_title is not None:
|
||||||
return self.client.artwork_url()
|
return self.client.artwork_url() + '?id=' + self.content_id
|
||||||
|
|
||||||
return 'https://cloud.githubusercontent.com/assets/260/9829355' \
|
return 'https://cloud.githubusercontent.com/assets/260/9829355' \
|
||||||
'/33fab972-58cf-11e5-8ea2-2ca74bdaae40.png'
|
'/33fab972-58cf-11e5-8ea2-2ca74bdaae40.png'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user