From 18fa4c31cda163fe2b6fa73c33635e317baae382 Mon Sep 17 00:00:00 2001 From: im85288 Date: Sat, 10 Nov 2018 12:18:47 +0000 Subject: [PATCH] safer check on playcount which may be None --- addon.xml | 2 +- resources/lib/player.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/addon.xml b/addon.xml index 8bc231ed..ac0e0a5a 100644 --- a/addon.xml +++ b/addon.xml @@ -1,5 +1,5 @@ - + diff --git a/resources/lib/player.py b/resources/lib/player.py index 3bcbbdbf..4d9e9ee9 100644 --- a/resources/lib/player.py +++ b/resources/lib/player.py @@ -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":