diff --git a/addon.xml b/addon.xml index 21a111c1..8bc231ed 100644 --- a/addon.xml +++ b/addon.xml @@ -1,5 +1,5 @@ - + diff --git a/resources/lib/player.py b/resources/lib/player.py index 22a1b363..3bcbbdbf 100644 --- a/resources/lib/player.py +++ b/resources/lib/player.py @@ -301,36 +301,36 @@ def autoPlayPlayback(self): nextUpPage.setItem(episode) nextUpPage.setProgressStepSize(progressStepSize) stillWatchingPage.setItem(episode) - nextUpPage.setProgressStepSize(progressStepSize) + stillWatchingPage.setProgressStepSize(progressStepSize) playedinarownumber = utils.settings("playedInARow") self.logMsg("played in a row settings %s" % str(playedinarownumber), 2) self.logMsg("played in a row %s" % str(self.playedinarow), 2) - - if int(self.playedinarow) <= int(playedinarownumber): + showingnextuppage = False + showingstillwatchingpage = False + hideforshortvideos = (self.shortplayNotification == "false") and (self.shortplayLength >= totalTime) and (self.shortplayMode == "true") + if int(self.playedinarow) <= int(playedinarownumber) and not hideforshortvideos: self.logMsg( "showing next up page as played in a row is %s" % str(self.playedinarow), 2) - if (self.shortplayNotification == "false") and (self.shortplayLength >= totalTime) and (self.shortplayMode == "true"): - self.logMsg("hiding notification for short videos") - else: - nextUpPage.show() - utils.window('service.upnext.dialog', 'true') - else: + nextUpPage.show() + utils.window('service.upnext.dialog', 'true') + showingnextuppage = True + elif not hideforshortvideos: self.logMsg( "showing still watching page as played in a row %s" % str(self.playedinarow), 2) - if (self.shortplayNotification == "false") and (self.shortplayLength >= totalTime) and (self.shortplayMode == "true"): - self.logMsg("hiding notification for short videos") - else: - stillWatchingPage.show() - utils.window('service.upnext.dialog', 'true') + stillWatchingPage.show() + utils.window('service.upnext.dialog', 'true') + showingstillwatchingpage = True while xbmc.Player().isPlaying() and ( totalTime - playTime > 1) and not nextUpPage.isCancel() and not nextUpPage.isWatchNow() and not stillWatchingPage.isStillWatching() and not stillWatchingPage.isCancel(): xbmc.sleep(100) - nextUpPage.updateProgressControl() - stillWatchingPage.updateProgressControl() try: playTime = xbmc.Player().getTime() totalTime = xbmc.Player().getTotalTime() + if showingnextuppage: + nextUpPage.updateProgressControl() + elif showingstillwatchingpage: + stillWatchingPage.updateProgressControl() except: pass if self.shortplayLength >= totalTime and self.shortplayMode == "true": @@ -341,12 +341,12 @@ def autoPlayPlayback(self): self.playedinarow = 1 shouldPlayDefault = not nextUpPage.isCancel() else: - if int(self.playedinarow) <= int(playedinarownumber): + if showingnextuppage: nextUpPage.close() utils.window('service.upnext.dialog', clear=True) shouldPlayDefault = not nextUpPage.isCancel() shouldPlayNonDefault = nextUpPage.isWatchNow() - else: + elif showingstillwatchingpage: stillWatchingPage.close() utils.window('service.upnext.dialog', clear=True) shouldPlayDefault = stillWatchingPage.isStillWatching()