Skip to content

Commit

Permalink
new postplay screen
Browse files Browse the repository at this point in the history
  • Loading branch information
im85288 committed Jan 7, 2017
1 parent 67093d9 commit 532c4d7
Showing 1 changed file with 18 additions and 22 deletions.
40 changes: 18 additions & 22 deletions service.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 532c4d7

Please sign in to comment.