Skip to content

Commit

Permalink
Fix errors with handle lyrics
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexxIT committed Apr 16, 2024
1 parent 732ab66 commit 6b365df
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/yandex_station/camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ async def handle_lyrics(
image = draw_lyrics(None, lines[0]) # before first
elif media_position > times[-1]:
lyric_pos = times[-1]
lyric_pos_next = entity.media_duration
lyric_pos_next = entity.media_duration or 65535
image = draw_lyrics(lines[-1], None) # last
else:
for i, ts in enumerate(times):
Expand Down
1 change: 1 addition & 0 deletions custom_components/yandex_station/core/yandex_station.py
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,7 @@ def async_set_state(self, data: dict):
self._attr_assumed_state = True
self._attr_media_artist = None
self._attr_media_channel = None
self._attr_media_content_id = None
self._attr_media_content_type = None
self._attr_media_duration = None
self._attr_media_image_url = None
Expand Down

0 comments on commit 6b365df

Please sign in to comment.