mirror of
https://github.com/home-assistant/core
synced 2024-09-28 03:04:04 +02:00
Do not request artwork if not available (#7189)
This should fix the "dancing media player" issue where the media player requests artwork when it's not really available, making the UI "dance".
This commit is contained in:
parent
2e11d49af3
commit
93820d5124
@ -145,6 +145,8 @@ class AppleTvDevice(MediaPlayerDevice):
|
||||
@callback
|
||||
def playstatus_update(self, updater, playing):
|
||||
"""Print what is currently playing when it changes."""
|
||||
self._playing = playing
|
||||
|
||||
if self.state == STATE_IDLE:
|
||||
self._artwork_hash = None
|
||||
elif self._has_playing_media_changed(playing):
|
||||
@ -153,7 +155,6 @@ class AppleTvDevice(MediaPlayerDevice):
|
||||
self._artwork_hash = hashlib.md5(
|
||||
base.encode('utf-8')).hexdigest()
|
||||
|
||||
self._playing = playing
|
||||
self.hass.async_add_job(self.async_update_ha_state())
|
||||
|
||||
def _has_playing_media_changed(self, new_playing):
|
||||
|
Loading…
Reference in New Issue
Block a user