mirror of
https://github.com/natekspencer/hacs-oasis_mini.git
synced 2025-11-13 23:53:51 -05:00
Fix track info with new format
This commit is contained in:
@@ -49,8 +49,8 @@ class OasisMiniMediaPlayerEntity(OasisMiniEntity, MediaPlayerEntity):
|
||||
@property
|
||||
def media_duration(self) -> int | None:
|
||||
"""Duration of current playing media in seconds."""
|
||||
if (track := self.device.track) and "reduced_svg_content" in track:
|
||||
return track["reduced_svg_content"].get("1")
|
||||
if (track := self.device.track) and "reduced_svg_content_new" in track:
|
||||
return track["reduced_svg_content_new"]
|
||||
return None
|
||||
|
||||
@property
|
||||
|
||||
Reference in New Issue
Block a user