From 532c4d7b3d710f7ae3809da78318850a7aad298c Mon Sep 17 00:00:00 2001 From: im85288 Date: Sat, 7 Jan 2017 15:27:36 +0000 Subject: [PATCH] new postplay screen --- service.py | 40 ++++++++++++++++++---------------------- 1 file changed, 18 insertions(+), 22 deletions(-) diff --git a/service.py b/service.py index 3f942e2..f974286 100644 --- a/service.py +++ b/service.py @@ -77,29 +77,25 @@ def ServiceEntryPoint(self): showpostplay = addonSettings.getSetting("showPostPlay") == "true" - if xbmcgui.Window(10000).getProperty("PseudoTVRunning") != "True" and not nextUpDisabled and not showpostplay: - if (totalTime - playTime <= int(notificationtime) and ( - lastFile is None or lastFile != currentFile)) and totalTime != 0: - lastFile = currentFile - self.logMsg("Calling autoplayback totaltime - playtime is %s" % (totalTime - playTime), 2) - player.autoPlayPlayback() - self.logMsg("Netflix style autoplay succeeded.", 2) - self.logMsg("playtime is %s" % (int(playTime)), 2) + if xbmcgui.Window(10000).getProperty("PseudoTVRunning") != "True" and not nextUpDisabled: + + if not showpostplay and (totalTime - playTime <= int(notificationtime) and ( + lastFile is None or lastFile != currentFile)) and totalTime != 0: + lastFile = currentFile + self.logMsg("Calling autoplayback totaltime - playtime is %s" % (totalTime - playTime), 2) + player.autoPlayPlayback() + self.logMsg("Netflix style autoplay succeeded.", 2) + + if showpostplay and (totalTime - playTime <= 10) and totalTime != 0: + self.logMsg("Calling post playback", 2) + player.postPlayPlayback() + + if displayrandomunwatched and (int(playTime) >= int(randomunwatchedtime)) and (int(playTime) < int(int(randomunwatchedtime)+100)) and ( + lastUnwatchedFile is None or lastUnwatchedFile != currentFile): self.logMsg("randomunwatchedtime is %s" % (int(randomunwatchedtime)), 2) - if (int(playTime) >= int(randomunwatchedtime)) and (int(playTime) < int(int(randomunwatchedtime)+100)) and displayrandomunwatched and ( - lastUnwatchedFile is None or lastUnwatchedFile != currentFile): - self.logMsg("Calling display unwatched", 2) - lastUnwatchedFile = currentFile - player.displayRandomUnwatched() - elif xbmcgui.Window(10000).getProperty("PseudoTVRunning") != "True" and not nextUpDisabled and showpostplay: - if (totalTime - playTime <= 10) and totalTime != 0: - self.logMsg("Calling post playback", 2) - player.postPlayPlayback() - if (int(playTime) >= int(randomunwatchedtime)) and (int(playTime) < int(int(randomunwatchedtime)+100)) and displayrandomunwatched and ( - lastUnwatchedFile is None or lastUnwatchedFile != currentFile): - self.logMsg("Calling display unwatched", 2) - lastUnwatchedFile = currentFile - player.displayRandomUnwatched() + self.logMsg("Calling display unwatched", 2) + lastUnwatchedFile = currentFile + player.displayRandomUnwatched() except Exception as e: