nextup info removed
This commit is contained in:
parent
1c601c5c1f
commit
4cbb648dc4
7 changed files with 0 additions and 300 deletions
|
@ -1,102 +0,0 @@
|
|||
|
||||
import sys
|
||||
import xbmc
|
||||
import xbmcgui
|
||||
import xbmcaddon
|
||||
import json as json
|
||||
import urllib
|
||||
from API import API
|
||||
from PlaybackUtils import PlaybackUtils
|
||||
|
||||
ACTION_PLAYER_STOP = 13
|
||||
|
||||
class NextUpInfo(xbmcgui.WindowXMLDialog):
|
||||
|
||||
item = None
|
||||
cancel = False
|
||||
watchnow = False
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
xbmcgui.WindowXMLDialog.__init__(self, *args, **kwargs)
|
||||
|
||||
def onInit(self):
|
||||
self.action_exitkeys_id = [10, 13]
|
||||
|
||||
image = API().getArtwork(self.item, "Primary2")
|
||||
clearartimage = API().getArtwork(self.item, "Art")
|
||||
overview = API().getOverview(self.item)
|
||||
name = API().getName(self.item)
|
||||
|
||||
episodeInfo = ""
|
||||
season = str(self.item.get("ParentIndexNumber"))
|
||||
episodeNum = str(self.item.get("IndexNumber"))
|
||||
episodeInfo = season + "x" + episodeNum + "."
|
||||
|
||||
rating = None
|
||||
if self.item.get("CommunityRating") != None and self.item.get("CommunityRating") !="":
|
||||
rating = str(self.item.get("CommunityRating"))
|
||||
year = API().getPremiereDate(self.item)
|
||||
duration = str(int(self.item.get("RunTimeTicks", "0"))/(10000000*60))
|
||||
info = year + " " + str(duration) + " min"
|
||||
# set the dialog data
|
||||
self.getControl(3000).setLabel(name)
|
||||
self.getControl(3001).setText(overview)
|
||||
self.getControl(3002).setLabel(episodeInfo)
|
||||
self.getControl(3004).setLabel(info)
|
||||
|
||||
self.getControl(3009).setImage(image)
|
||||
self.getControl(3006).setImage(clearartimage)
|
||||
|
||||
if rating != None:
|
||||
self.getControl(3003).setLabel(rating)
|
||||
else:
|
||||
self.getControl(3003).setVisible(False)
|
||||
|
||||
|
||||
def setItem(self, item):
|
||||
self.item = item
|
||||
|
||||
def setCancel(self, cancel):
|
||||
self.cancel = cancel
|
||||
|
||||
def isCancel(self):
|
||||
return self.cancel
|
||||
|
||||
def setWatchNow(self, watchnow):
|
||||
self.watchnow = watchnow
|
||||
|
||||
def isWatchNow(self):
|
||||
return self.watchnow
|
||||
|
||||
def onFocus(self, controlId):
|
||||
pass
|
||||
|
||||
def doAction(self):
|
||||
pass
|
||||
|
||||
def closeDialog(self):
|
||||
self.close()
|
||||
|
||||
def onClick(self, controlID):
|
||||
|
||||
xbmc.log("nextup info onclick: "+str(controlID))
|
||||
|
||||
if(controlID == 3012):
|
||||
# watch now
|
||||
self.setWatchNow(True)
|
||||
self.close()
|
||||
|
||||
elif(controlID == 3013):
|
||||
#cancel
|
||||
self.setCancel(True)
|
||||
self.close()
|
||||
|
||||
pass
|
||||
|
||||
def onAction(self, action):
|
||||
|
||||
xbmc.log("nextup info action: "+str(action.getId()))
|
||||
if action == ACTION_PLAYER_STOP:
|
||||
self.close()
|
||||
|
||||
|
|
@ -1,198 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<window>
|
||||
<defaultcontrol always="true">3012</defaultcontrol>
|
||||
<zorder>0</zorder>
|
||||
<controls>
|
||||
<control type="group">
|
||||
<control type="group">
|
||||
<animation effect="slide" start="0" end="0,-190" time="150" condition="Window.IsVisible(NextUpInfo.xml)">Conditional</animation>
|
||||
<animation effect="slide" start="0,110" end="0" time="150">Visible</animation>
|
||||
<animation effect="slide" start="0,110" end="0" time="150">WindowOpen</animation>
|
||||
<control type="image" id="3006">
|
||||
<right>0</right>
|
||||
<bottom>110</bottom>
|
||||
<width>500</width>
|
||||
<height>281</height>
|
||||
<aspectratio align="right" aligny="bottom">keep</aspectratio>
|
||||
</control>
|
||||
<control type="image">
|
||||
<top>110r</top>
|
||||
<width>100%</width>
|
||||
<height>374</height>
|
||||
<texture>white.png</texture>
|
||||
<colordiffuse>ff010101</colordiffuse>
|
||||
</control>
|
||||
<!-- buttons -->
|
||||
<control type="button" id="3012">
|
||||
<description>Watch Now</description>
|
||||
<right>0</right>
|
||||
<bottom>40</bottom>
|
||||
<width>200</width>
|
||||
<onup>3013</onup>
|
||||
<ondown>3013</ondown>
|
||||
<font>font14</font>
|
||||
<label>Watch Now</label>
|
||||
<focusedcolor>FFededed</focusedcolor>
|
||||
<disabledcolor>B3dddddd</disabledcolor>
|
||||
<selectedcolor>FFff4081</selectedcolor>
|
||||
<height>68</height>
|
||||
<textcolor>ff333333</textcolor>
|
||||
</control>
|
||||
<control type="button" id="3013">
|
||||
<description>Cancel</description>
|
||||
<right>0</right>
|
||||
<bottom>-30</bottom>
|
||||
<width>200</width>
|
||||
<onup>3012</onup>
|
||||
<ondown>3012</ondown>
|
||||
<font>font14</font>
|
||||
<label>222</label>
|
||||
<focusedcolor>FFededed</focusedcolor>
|
||||
<disabledcolor>B3dddddd</disabledcolor>
|
||||
<selectedcolor>FFff4081</selectedcolor>
|
||||
<height>68</height>
|
||||
<textcolor>ff333333</textcolor>
|
||||
</control>
|
||||
</control>
|
||||
<control type="group">
|
||||
<top>300r</top>
|
||||
<bottom>0</bottom>
|
||||
<width>100%</width>
|
||||
<animation effect="fade" start="0" end="100" delay="150" time="150">Visible</animation>
|
||||
<animation effect="fade" start="0" end="100" delay="150" time="150">WindowOpen</animation>
|
||||
<control type="group">
|
||||
<left>80</left>
|
||||
<right>80</right>
|
||||
<top>20</top>
|
||||
<bottom>20</bottom>
|
||||
<control type="image" id="3009">
|
||||
<left>-70</left>
|
||||
<top>-226</top>
|
||||
<width>334</width>
|
||||
<height>486</height>
|
||||
</control>
|
||||
<control type="group">
|
||||
<left>294</left>
|
||||
<right>0</right>
|
||||
<control type="label">
|
||||
<width>100%</width>
|
||||
<top>0</top>
|
||||
<height>40</height>
|
||||
<font>font16</font>
|
||||
<textcolor>B3dddddd</textcolor>
|
||||
<label>$INFO[Control.GetLabel(3002),Up Next... ,][COLOR=orange]$INFO[Control.GetLabel(3000), ,][/COLOR]</label>
|
||||
</control>
|
||||
<control type="label" description="episode/season info" id="3002">
|
||||
<width>100%</width>
|
||||
<top>0</top>
|
||||
<left>175</left>
|
||||
<height>40</height>
|
||||
<font>font16</font>
|
||||
<textcolor>B3dddddd</textcolor>
|
||||
<visible>false</visible>
|
||||
</control>
|
||||
<control type="label" description="Title" id="3000">
|
||||
<width>100%</width>
|
||||
<left>267</left>
|
||||
<top>0</top>
|
||||
<height>40</height>
|
||||
<font>font16</font>
|
||||
<textcolor>orange</textcolor>
|
||||
<visible>false</visible>
|
||||
</control>
|
||||
<control type="image">
|
||||
<top>52</top>
|
||||
<width>24</width>
|
||||
<height>24</height>
|
||||
<aspect>keep</aspect>
|
||||
<texture>imdb.png</texture>
|
||||
<visible>Control.IsVisible(3003)</visible>
|
||||
</control>
|
||||
<control type="label" id="3003" description="rating">
|
||||
<left>35</left>
|
||||
<width>100%</width>
|
||||
<top>50</top>
|
||||
<height>40</height>
|
||||
<font>font14</font>
|
||||
<textcolor>B3dddddd</textcolor>
|
||||
</control>
|
||||
<control type="label" id="3004" description="year/runtime">
|
||||
<left>90</left>
|
||||
<width>100%</width>
|
||||
<top>50</top>
|
||||
<height>40</height>
|
||||
<font>font14</font>
|
||||
<textcolor>B3dddddd</textcolor>
|
||||
<scroll>false</scroll>
|
||||
<visible>Control.IsVisible(3003)</visible>
|
||||
</control>
|
||||
<control type="label" id="3004" description="year/runtime">
|
||||
<width>100%</width>
|
||||
<top>50</top>
|
||||
<height>40</height>
|
||||
<font>font14</font>
|
||||
<textcolor>B3dddddd</textcolor>
|
||||
<scroll>false</scroll>
|
||||
<visible>!Control.IsVisible(3003)</visible>
|
||||
</control>
|
||||
<control type="textbox" description="Plot" id="3001">
|
||||
<width>85%</width>
|
||||
<top>105</top>
|
||||
<height>68</height>
|
||||
<font>font12</font>
|
||||
<align>justify</align>
|
||||
<left>0</left>
|
||||
<textcolor>4Ddddddd</textcolor>
|
||||
</control>
|
||||
<control type="label" description="Next up">
|
||||
<width>400</width>
|
||||
<bottom>30</bottom>
|
||||
<height>40</height>
|
||||
<font>font12</font>
|
||||
<textcolor>B3dddddd</textcolor>
|
||||
<label>Press cancel to stop automatic play of next episode...</label>
|
||||
</control>
|
||||
<control type="label" description="Total Time">
|
||||
<right>-30</right>
|
||||
<align>right</align>
|
||||
<width>400</width>
|
||||
<bottom>30</bottom>
|
||||
<height>80</height>
|
||||
<font>WeatherTemp</font>
|
||||
<textcolor>B3dddddd</textcolor>
|
||||
<label>$INFO[Player.TimeRemaining(ss)]</label>
|
||||
</control>
|
||||
<control type="image">
|
||||
<description>Progress Back</description>
|
||||
<width>100%</width>
|
||||
<bottom>10</bottom>
|
||||
<height>8</height>
|
||||
<texture colordiffuse="1F000000">white.png</texture>
|
||||
`
|
||||
</control>
|
||||
<control type="progress" description="cache">
|
||||
<description>Progress Bar</description>
|
||||
<width>100%</width>
|
||||
<bottom>10</bottom>
|
||||
<height>8</height>
|
||||
<info>Player.ProgressCache</info>
|
||||
<visible>true</visible>
|
||||
<texturebg colordiffuse="00ffffff">progress-bg.png</texturebg>
|
||||
<lefttexture colordiffuse="FFff4081">progress-end.png</lefttexture>
|
||||
<midtexture colordiffuse="FFff4081">progress-end.png</midtexture>
|
||||
<righttexture colordiffuse="FFff4081">progress-end.png</righttexture>
|
||||
</control>
|
||||
<control type="progress" id="23">
|
||||
<description>Progress Bar</description>
|
||||
<width>100%</width>
|
||||
<bottom>10</bottom>
|
||||
<height>8</height>
|
||||
<info>Player.Progress</info>
|
||||
<visible>true</visible>
|
||||
</control>
|
||||
</control>
|
||||
</control>
|
||||
</control>
|
||||
</control>
|
||||
</controls>
|
||||
</window>
|
Binary file not shown.
Before Width: | Height: | Size: 244 B |
Binary file not shown.
Before Width: | Height: | Size: 2.4 KiB |
Binary file not shown.
Before Width: | Height: | Size: 349 B |
Binary file not shown.
Before Width: | Height: | Size: 190 B |
Binary file not shown.
Before Width: | Height: | Size: 263 B |
Loading…
Reference in a new issue