From 6174c1754be2287743cc8581051ffb41aa8cc038 Mon Sep 17 00:00:00 2001 From: Eleftherios Chamakiotis Date: Sat, 10 Feb 2018 00:09:34 +0200 Subject: [PATCH] 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 --- homeassistant/components/media_player/itunes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/media_player/itunes.py b/homeassistant/components/media_player/itunes.py index 3291c1ae13d..ca0979f1752 100644 --- a/homeassistant/components/media_player/itunes.py +++ b/homeassistant/components/media_player/itunes.py @@ -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'