Skip to content

Commit

Permalink
[action_controller] fix missing on_avchange callbacks
Browse files Browse the repository at this point in the history
Fix zoom with ads streams
  • Loading branch information
CastagnaIT committed Jan 8, 2024
1 parent c2acdd3 commit 4547c80
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion resources/lib/services/playback/action_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,6 @@ def on_playback_tick(self):
# usually 1 sec is enough time to receive up to 3 OnAVChange events (audio/video/subs)
if (time.time() - self._av_change_last_ts) > 1:
if self._is_av_started:
self._is_av_started = False
self._on_avchange_delayed(player_state)
if self._is_delayed_seek:
self._is_delayed_seek = False
Expand Down
2 changes: 1 addition & 1 deletion resources/lib/services/playback/am_stream_continuity.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def _init(self, player_state): # pylint: disable=too-many-branches
self._save_changed_stream('video_zoom', None)
common.json_rpc('Player.SetViewMode', {'viewmode': {'zoom': 1.0}})

if is_enabled:
if is_enabled and not self.need_delay_init:
# It is mandatory to wait at least 1 second to allow the Kodi system to update the values
# changed by restore, otherwise when on_tick is executed it will save twice unnecessarily
xbmc.sleep(1000)
Expand Down

0 comments on commit 4547c80

Please sign in to comment.