From f8694282bd4306d8ec2ce723a6fa1afbc788e38c Mon Sep 17 00:00:00 2001 From: littlesat Date: Tue, 7 Apr 2015 16:29:43 +0200 Subject: [PATCH] Solve GSOD when movieselection is parentally protected. --- lib/python/Screens/MovieSelection.py | 13 ++++++------- 1 files changed, 6 insertions(+), 7 deletions(-) diff --git a/lib/python/Screens/MovieSelection.py b/lib/python/Screens/MovieSelection.py index e682bed..cb74a0d 100644 --- a/lib/python/Screens/MovieSelection.py +++ b/lib/python/Screens/MovieSelection.py @@ -1343,6 +1343,11 @@ class MovieSelection(Screen, HelpableScreen, SelectionEventInfo, InfoBarBase, Pr ) def gotFilename(self, res, selItem=None, doParentalControl=True): + def pinEntered(res, selItem, result): + if result: + from Components.ParentalControl import parentalControl + parentalControl.setSessionPinCached() + self.gotFilename(res, selItem, False) if not res: return # serviceref must end with / @@ -1353,7 +1358,7 @@ class MovieSelection(Screen, HelpableScreen, SelectionEventInfo, InfoBarBase, Pr if os.path.isdir(res): baseName = os.path.basename(res[:-1]) if doParentalControl and config.ParentalControl.servicepin[0].value and baseName.startswith(".") and not baseName.startswith(".Trash"): - self.session.openWithCallback(boundFunction(self.pinEntered, res, selItem), PinInput, pinList=[x.value for x in config.ParentalControl.servicepin], triesEntry=config.ParentalControl.retries.servicepin, title=_("Please enter the correct pin code"), windowTitle=_("Enter pin code")) + self.session.openWithCallback(boundFunction(pinEntered, res, selItem), PinInput, pinList=[x.value for x in config.ParentalControl.servicepin], triesEntry=config.ParentalControl.retries.servicepin, title=_("Please enter the correct pin code"), windowTitle=_("Enter pin code")) else: config.movielist.last_videodir.value = res config.movielist.last_videodir.save() @@ -1372,12 +1377,6 @@ class MovieSelection(Screen, HelpableScreen, SelectionEventInfo, InfoBarBase, Pr timeout = 5 ) - def pinEntered(self, res, selItem, result): - if result: - from Components.ParentalControl import parentalControl - parentalControl.setSessionPinCached() - self.gotFilename(res, selItem, False) - def showAll(self): self.selected_tags_ele = None self.selected_tags = None -- 1.7.1