Skip to content

Commit

Permalink
[Navigation.playService] for iptv services force an evStart event imm…
Browse files Browse the repository at this point in the history
…ediately on zapping so the gui updates and the user doesn't feel like the box is frozen
  • Loading branch information
Huevos committed Sep 4, 2024
1 parent 2cebde0 commit a768fcc
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions lib/python/Navigation.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,20 @@ def playService(self, ref, checkParentalControl=True, forceRestart=False, adjust
if ref is None:
self.stopService()
return 0
from Components.ServiceEventTracker import InfoBarCount
InfoBarInstance = InfoBarCount == 1 and InfoBar.instance
InfoBarInstance = InfoBar.instance

# for iptv services force an evStart event immediately on zapping so the gui updates and the user doesn't feel like the box is frozen
if "%3a//" in ref.toString():
self.currentlyPlayingServiceReference = ref
self.currentlyPlayingServiceOrGroup = ref
self.originalPlayingServiceReference = ref

if InfoBarInstance:
InfoBarInstance.session.screen["CurrentService"].newService(ref)
InfoBarInstance.session.screen["Event_Now"].updateSource(ref)
InfoBarInstance.session.screen["Event_Next"].updateSource(ref)
InfoBarInstance.serviceStarted()

if not checkParentalControl or parentalControl.isServicePlayable(ref, boundFunction(self.playService, checkParentalControl=False, forceRestart=forceRestart, adjust=adjust)):
if ref.flags & eServiceReference.isGroup:
oldref = self.currentlyPlayingServiceReference or eServiceReference()
Expand Down

0 comments on commit a768fcc

Please sign in to comment.