Fix Android TV icon when screencap option is disabled (#35710)

* Don't return a media image hash if the screencap config option is False

* 1-liner
This commit is contained in:
Jeff Irion 2020-05-26 17:02:18 -07:00 committed by GitHub
parent ca1e643bdc
commit 6a06d648d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -452,6 +452,11 @@ class ADBDevice(MediaPlayerEntity):
"""Provide the last ADB command's response as an attribute."""
return {"adb_response": self._adb_response}
@property
def media_image_hash(self):
"""Hash value for media image."""
return f"{datetime.now().timestamp()}" if self._screencap else None
@property
def name(self):
"""Return the device name."""
@ -497,11 +502,6 @@ class ADBDevice(MediaPlayerEntity):
"""Raw image data."""
return self.aftv.adb_screencap()
@property
def media_image_hash(self):
"""Hash value for media image."""
return f"{datetime.now().timestamp()}"
@adb_decorator()
def media_play(self):
"""Send play command."""