Skip to content

Commit

Permalink
new project
Browse files Browse the repository at this point in the history
  • Loading branch information
im85288 committed Oct 9, 2018
1 parent 0f9ebe5 commit 460477b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
9 changes: 8 additions & 1 deletion resources/lib/stillwatching.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ def onInit(self):
self.setInfo()

def setInfo(self):
episodeInfo = str(self.item['season']) + 'x' + str(self.item['episode']) + '.'
if self.item['rating'] is not None:
rating = str(round(float(self.item['rating']), 1))
else:
rating = None

if self.item is not None:
self.setProperty(
Expand All @@ -48,10 +53,12 @@ def setInfo(self):
'season', str(self.item['season']))
self.setProperty(
'episode', str(self.item['episode']))
self.setProperty(
'seasonepisode', episodeInfo)
self.setProperty(
'year', str(self.item['firstaired']))
self.setProperty(
'rating', str(round(float(self.item['rating']), 1)))
'rating', rating)
self.setProperty(
'duration', str(self.item['runtime'] / 60))
self.setProperty(
Expand Down
6 changes: 5 additions & 1 deletion resources/lib/upnext.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ def onInit(self):

def setInfo(self):
episodeInfo = str(self.item['season']) + 'x' + str(self.item['episode']) + '.'
if self.item['rating'] is not None:
rating = str(round(float(self.item['rating']), 1))
else:
rating = None

if self.item is not None:
self.setProperty(
Expand Down Expand Up @@ -52,7 +56,7 @@ def setInfo(self):
self.setProperty(
'year', str(self.item['firstaired']))
self.setProperty(
'rating', str(round(float(self.item['rating']), 1)))
'rating', rating)
self.setProperty(
'duration', str(self.item['runtime'] / 60))
self.setProperty(
Expand Down
3 changes: 2 additions & 1 deletion resources/skins/default/1080i/script-upnext-upnext.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@
<animation effect="fade" start="100" end="97" time="200" condition="true">Conditional</animation>
<texture border="5" colordiffuse="ff000000">box.png</texture>
</control>
<control type="image" id="3005" description="fanart">
<control type="image" description="fanart">
<width>100%</width>
<height>100%</height>
<fadetime>350</fadetime>
<aspectratio scalediffuse="false">scale</aspectratio>
<texture background="true">$INFO[Window.Property(fanart)]</texture>
</control>
<control type="image">
<left>0</left>
Expand Down

0 comments on commit 460477b

Please sign in to comment.