From c75e4c490dbf93d82e268f7343553aea07c5c98b Mon Sep 17 00:00:00 2001 From: im85288 Date: Tue, 3 Nov 2015 15:17:33 +0000 Subject: [PATCH] added play count --- README.md | 4 +++- addon.xml | 2 +- resources/lib/NextUpInfo.py | 8 ++++++++ resources/lib/StillWatchingInfo.py | 8 ++++++++ 4 files changed, 20 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index cfd4dc0..acbd720 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,7 @@ Skinners: - 3013 - Cancel Button - 3015 - Season Number - 3016 - Episode Number + - 3018 - Play Count - script-nextup-notification-StillWatchingInfo.xml - 4000 - Label @@ -44,4 +45,5 @@ Skinners: - 4011 - Video Resolution - 4012 - Continue Watching Button - 4013 - Cancel Button - - 4014 - TV Show ClearArt \ No newline at end of file + - 4014 - TV Show ClearArt + - 4018 - Play Count \ No newline at end of file diff --git a/addon.xml b/addon.xml index ac2670c..97ed51c 100755 --- a/addon.xml +++ b/addon.xml @@ -1,5 +1,5 @@ - + diff --git a/resources/lib/NextUpInfo.py b/resources/lib/NextUpInfo.py index 22d6507..48f6cef 100644 --- a/resources/lib/NextUpInfo.py +++ b/resources/lib/NextUpInfo.py @@ -27,6 +27,7 @@ def onInit(self): fanartimage = self.item['art'].get('tvshow.fanart', '') overview = self.item['plot'] name = self.item['title'] + playcount = self.item['playcount'] season = self.item['season'] episodeNum = self.item['episode'] @@ -105,6 +106,13 @@ def onInit(self): except: pass + try: + playcountControl = self.getControl(3018) + if playcountControl != None: + playcountControl.setLabel(str(playcount)) + except: + pass + def setItem(self, item): self.item = item diff --git a/resources/lib/StillWatchingInfo.py b/resources/lib/StillWatchingInfo.py index 9e87130..a5be127 100644 --- a/resources/lib/StillWatchingInfo.py +++ b/resources/lib/StillWatchingInfo.py @@ -33,6 +33,7 @@ def onInit(self): season = self.item['season'] episodeNum = self.item['episode'] title = self.item['title'] + playcount = self.item['playcount'] # set the dialog data self.getControl(4000).setLabel(name) self.getControl(4006).setText(overview) @@ -104,6 +105,13 @@ def onInit(self): except: pass + try: + playcountControl = self.getControl(4018) + if playcountControl != None: + playcountControl.setLabel(str(playcount)) + except: + pass + def setItem(self, item): self.item = item