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:
Eleftherios Chamakiotis 2018-02-10 00:09:34 +02:00 committed by Paulus Schoutsen
parent 4c11a3461f
commit 6174c1754b

View File

@ -284,7 +284,7 @@ class ItunesDevice(MediaPlayerDevice):
"""Image url of current playing media."""
if self.player_state in (STATE_PLAYING, STATE_IDLE, STATE_PAUSED) and \
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' \
'/33fab972-58cf-11e5-8ea2-2ca74bdaae40.png'