Skip to content

Commit

Permalink
Better solution for GDOD for movieselected
Browse files Browse the repository at this point in the history
By concentrating the change in code for what is changed. The config menu
in the movieselection can return True in case a parameter is changed so
target when service is a bool and this bool is also True
  • Loading branch information
Littlesat committed Jan 27, 2025
1 parent 20cd2c8 commit 9020b80
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/python/Screens/InfoBar.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,12 @@ def movieSelected(self, service):
if service is None:
if ref and not self.session.nav.getCurrentlyPlayingServiceOrGroup():
self.session.nav.playService(ref)
elif service.valid():
elif isinstance(service, bool) and service:
self.showMovies()
else:
from Components.ParentalControl import parentalControl
if parentalControl.isServicePlayable(service, self.openMoviePlayer):
self.openMoviePlayer(service)
elif service is True:
self.showMovies()

def openMoviePlayer(self, ref):
self.session.open(MoviePlayer, ref, slist=self.servicelist, lastservice=self.session.nav.getCurrentlyPlayingServiceOrGroup(), infobar=self)
Expand Down Expand Up @@ -536,15 +536,15 @@ def showMovies(self):
self.movieselection_dlg = self.session.openWithCallback(self.movieSelected, Screens.MovieSelection.MovieSelection, ref)

def movieSelected(self, service):
if service is not None and service.valid():
if isinstance(service, bool) and service:
self.showMovies()
elif service is not None:
if self.cur_service and self.cur_service != service:
resumePointsInstance.setResumePoint(self.session)
self.cur_service = service
self.is_closing = False
self.session.nav.playService(service)
self.returning = False
elif service is True:
self.showMovies()
elif self.returning:
self.close()
else:
Expand Down

0 comments on commit 9020b80

Please sign in to comment.