Skip to content

Commit

Permalink
safer check on playcount which may be None
Browse files Browse the repository at this point in the history
  • Loading branch information
im85288 committed Nov 10, 2018
1 parent 8b224ee commit 18fa4c3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion addon.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
<addon id="service.upnext" name="Up Next" provider-name="im85288" version="0.1.4">
<addon id="service.upnext" name="Up Next" provider-name="im85288" version="0.1.5">
<requires>
<import addon="xbmc.python" version="2.20.0"/>
<import addon="script.module.requests" version="2.9.1" />
Expand Down
3 changes: 2 additions & 1 deletion resources/lib/player.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,8 @@ def autoPlayPlayback(self):
return
self.logMsg("episode details %s" % str(episode), 2)
episodeid = episode["episodeid"]
includePlaycount = True if self.includeWatched else episode["playcount"] == 0
noplaycount = episode["playcount"] is None or episode["playcount"] == 0
includePlaycount = True if self.includeWatched else noplaycount
if includePlaycount and self.currentepisodeid != episodeid:
# we have a next up episode choose mode
if utils.settings("simpleMode") == "0":
Expand Down

0 comments on commit 18fa4c3

Please sign in to comment.