From b1d8ed5e495e06a9dfc1d2218a2dfcd4d09efa8b Mon Sep 17 00:00:00 2001 From: Huevos Date: Sat, 7 Sep 2024 19:28:46 +0200 Subject: [PATCH] [Navigation] playService, update forced evStart --- lib/python/Navigation.py | 38 +++++++++++++++++--------------------- 1 file changed, 17 insertions(+), 21 deletions(-) diff --git a/lib/python/Navigation.py b/lib/python/Navigation.py index cd9b5a6a81..74101080a0 100644 --- a/lib/python/Navigation.py +++ b/lib/python/Navigation.py @@ -121,18 +121,6 @@ def playService(self, ref, checkParentalControl=True, forceRestart=False, adjust return 0 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() @@ -211,15 +199,23 @@ def playService(self, ref, checkParentalControl=True, forceRestart=False, adjust self.retryServicePlayTimer = eTimer() self.retryServicePlayTimer.callback.append(boundFunction(self.playService, ref, checkParentalControl, forceRestart, adjust)) self.retryServicePlayTimer.start(config.misc.softcam_streamrelay_delay.value, True) - elif self.pnav.playService(playref): - # print("[Navigation] Failed to start", playref) - self.currentlyPlayingServiceReference = None - self.currentlyPlayingServiceOrGroup = None - if oldref and "://" in oldref.getPath(): - print("[Navigation] Streaming was active -> try again") # use timer to give the streamserver the time to deallocate the tuner - self.retryServicePlayTimer = eTimer() - self.retryServicePlayTimer.callback.append(boundFunction(self.playService, ref, checkParentalControl, forceRestart, adjust)) - self.retryServicePlayTimer.start(500, True) + else: + if self.pnav.playService(playref): + # print("[Navigation] Failed to start", playref) + self.currentlyPlayingServiceReference = None + self.currentlyPlayingServiceOrGroup = None + if oldref and "://" in oldref.getPath(): + print("[Navigation] Streaming was active -> try again") # use timer to give the streamserver the time to deallocate the tuner + self.retryServicePlayTimer = eTimer() + self.retryServicePlayTimer.callback.append(boundFunction(self.playService, ref, checkParentalControl, forceRestart, adjust)) + self.retryServicePlayTimer.start(500, True) + else: # self.pnav.playService was successful so force evStart here immediately because that doesn't happen for iptv services so the box appears frozen + self.currentlyPlayingServiceOrGroup = self.currentlyPlayingServiceReference + if InfoBarInstance: + InfoBarInstance.session.screen["CurrentService"].newService(self.currentlyPlayingServiceReference) + InfoBarInstance.session.screen["Event_Now"].updateSource(self.currentlyPlayingServiceReference) + InfoBarInstance.session.screen["Event_Next"].updateSource(self.currentlyPlayingServiceReference) + InfoBarInstance.serviceStarted() self.skipServiceReferenceReset = False if setPriorityFrontend: setPreferredTuner(int(config.usage.frontend_priority.value))