experimental window
This commit is contained in:
11
default.py
11
default.py
@@ -62,6 +62,7 @@ from Utils import PlayUtils
|
||||
from ClientInformation import ClientInformation
|
||||
from PersonInfo import PersonInfo
|
||||
from SearchDialog import SearchDialog
|
||||
from DisplayItems import DisplayItems
|
||||
|
||||
ADDON_VERSION = ClientInformation().getVersion()
|
||||
|
||||
@@ -1448,16 +1449,18 @@ def showItemInfo(pluginName, handle, params):
|
||||
|
||||
del infoPage
|
||||
|
||||
def showSearch(pluginName, handle, params):
|
||||
def showSearch(pluginName, handle, params):
|
||||
printDebug("showSearch Called" + str(params))
|
||||
xbmcplugin.endOfDirectory(handle, cacheToDisc=False)
|
||||
|
||||
|
||||
searchDialog = SearchDialog("SearchDialog.xml", __cwd__, "default", "720p")
|
||||
|
||||
searchDialog.doModal()
|
||||
|
||||
del searchDialog
|
||||
|
||||
#items = DisplayItems("DisplayItems.xml", __cwd__, "default", "720p")
|
||||
#items.doModal()
|
||||
#del items
|
||||
|
||||
def showPersonInfo(pluginName, handle, params):
|
||||
printDebug("showPersonInfo Called" + str(params))
|
||||
xbmcplugin.endOfDirectory(handle, cacheToDisc=False)
|
||||
|
||||
@@ -158,10 +158,6 @@ class ArtworkRotationThread(threading.Thread):
|
||||
data = {}
|
||||
if(len(self.global_art_links) > 0):
|
||||
data["global"] = self.global_art_links[self.current_global_art]
|
||||
#if(len(self.movie_art_links) > 0):
|
||||
# data["movie"] = self.movie_art_links[self.current_movie_art]
|
||||
#if(len(self.tv_art_links) > 0):
|
||||
# data["tv"] = self.tv_art_links[self.current_tv_art]
|
||||
|
||||
__addon__ = xbmcaddon.Addon(id='plugin.video.mbcon')
|
||||
__addondir__ = xbmc.translatePath( __addon__.getAddonInfo('profile') )
|
||||
@@ -311,7 +307,7 @@ class ArtworkRotationThread(threading.Thread):
|
||||
parentid = result.get("Id")
|
||||
self.logMsg("updateCollectionArtLinks ParentID : " + str(parentid), 2)
|
||||
|
||||
userRootPath = "http://" + mb3Host + ":" + mb3Port + "/mediabrowser/Users/" + userid + "/items?ParentId=" + parentid + "&SortBy=SortName&Fields=CollectionType,Overview,RecursiveItemCount&format=json"
|
||||
userRootPath = "http://" + mb3Host + ":" + mb3Port + "/mediabrowser/Users/" + userid + "/items?ParentId=" + parentid + "&SortBy=SortName&Fields=CollectionType,RecursiveItemCount&format=json"
|
||||
|
||||
jsonData = downloadUtils.downloadUrl(userRootPath, suppress=False, popup=1 )
|
||||
self.logMsg("updateCollectionArtLinks userRootPath : " + str(jsonData), 2)
|
||||
|
||||
95
resources/lib/DisplayItems.py
Normal file
95
resources/lib/DisplayItems.py
Normal file
@@ -0,0 +1,95 @@
|
||||
import xbmcplugin
|
||||
import xbmcgui
|
||||
import xbmcaddon
|
||||
import xbmc
|
||||
import threading
|
||||
import sys
|
||||
|
||||
class DisplayItems(xbmcgui.WindowXMLDialog):
|
||||
|
||||
actionThread = None
|
||||
|
||||
def __init__(self,strXMLname, strFallbackPath, strDefaultName, forceFallback):
|
||||
# Changing the three varibles passed won't change, anything
|
||||
# Doing strXMLname = "bah.xml" will not change anything.
|
||||
# don't put GUI sensitive stuff here (as the xml hasn't been read yet
|
||||
# Idea to initialize your variables here
|
||||
|
||||
pass
|
||||
|
||||
def onInit(self):
|
||||
# Put your List Populating code/ and GUI startup stuff here
|
||||
self.actionThread = BackgroundItemThread()
|
||||
self.actionThread.setWindow(self)
|
||||
self.actionThread.start()
|
||||
|
||||
pass
|
||||
|
||||
def onAction(self, action):
|
||||
|
||||
aId = action.getId()
|
||||
#xbmc.log("Windows Action : " + str(aId))
|
||||
|
||||
if aId == 10 or aId == 92:
|
||||
self.close()
|
||||
else:
|
||||
pass
|
||||
|
||||
def onClick(self, controlID):
|
||||
"""
|
||||
Notice: onClick not onControl
|
||||
Notice: it gives the ID of the control not the control object
|
||||
"""
|
||||
pass
|
||||
|
||||
def onFocus(self, controlID):
|
||||
pass
|
||||
|
||||
class BackgroundItemThread(threading.Thread):
|
||||
|
||||
rootWindow = None
|
||||
|
||||
def setWindow(self, window):
|
||||
self.rootWindow = window
|
||||
|
||||
def run(self):
|
||||
xbmc.log("BackgroundItemThread Started")
|
||||
|
||||
#self.rootWindow.setProperty('content','movies')
|
||||
#xbmc.executebuiltin("Container.SetContent(movies)")
|
||||
#xbmc.executebuiltin("Container.SetViewMode(522)")
|
||||
|
||||
itemList = self.rootWindow.getControl(50)
|
||||
|
||||
thumbPath = "http://192.168.0.27:8096/mediabrowser/Items/924b2d98a64ae17fc31417b3cce02783/Images/Primary/0/0e5801646b3f1b8361a8bc73ff86a9e4/original/10000/10000/0"
|
||||
|
||||
for x in range(0, 500):
|
||||
listItem = xbmcgui.ListItem(label="Test-" + str(x), label2="Test2-" + str(x), iconImage=thumbPath, thumbnailImage=thumbPath)
|
||||
|
||||
infolabels = { "title": "My Movie-" + str(x), "Plot": "Some plot inof", "plotoutline": "short plot", "tvshowtitle": "My TV Title", "originaltitle": "Original Title"}
|
||||
listItem.setInfo( type="movies", infoLabels=infolabels )
|
||||
listItem.setProperty('IsPlayable', 'true')
|
||||
|
||||
#selected = itemList.getSelectedItem()
|
||||
selected = itemList.getSelectedPosition()
|
||||
xbmc.log("SELECTED 01: " + str(selected))
|
||||
|
||||
itemList.addItem(listItem)
|
||||
|
||||
if(selected != -1):
|
||||
#item = itemList.getListItem(selected)
|
||||
#selected = itemList.getSelectedItem()
|
||||
#xbmc.log("SELECTED 02: " + str(item))
|
||||
itemList.selectItem(selected)
|
||||
#item.select(True)
|
||||
|
||||
xbmc.sleep(200)
|
||||
|
||||
|
||||
|
||||
|
||||
xbmc.log("BackgroundItemThread Exiting")
|
||||
|
||||
|
||||
|
||||
|
||||
114
resources/skins/default/720p/DisplayItems.xml
Normal file
114
resources/skins/default/720p/DisplayItems.xml
Normal file
@@ -0,0 +1,114 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<window>
|
||||
<defaultcontrol always="true">50</defaultcontrol>
|
||||
<allowoverlay>no</allowoverlay>
|
||||
<controls>
|
||||
|
||||
<include>CommonBackground</include>
|
||||
|
||||
|
||||
<control type="group">
|
||||
<visible>true</visible>
|
||||
<control type="panel" id="50">
|
||||
<left>60</left>
|
||||
<top>58</top>
|
||||
<width>1200</width>
|
||||
<height>576</height>
|
||||
<onleft>2</onleft>
|
||||
<onright>759</onright>
|
||||
<onup>522</onup>
|
||||
<ondown>522</ondown>
|
||||
<pagecontrol>759</pagecontrol>
|
||||
<scrolltime>200</scrolltime>
|
||||
<preloaditems>2</preloaditems>
|
||||
|
||||
|
||||
|
||||
<itemlayout height="192" width="145">
|
||||
<control type="image">
|
||||
<left>0</left>
|
||||
<top>0</top>
|
||||
<width>125</width>
|
||||
<height>180</height>
|
||||
<bordertexture border="5">button-nofocus.png</bordertexture>
|
||||
<bordersize>5</bordersize>
|
||||
<aspectratio>stretch</aspectratio>
|
||||
<texture background="true">$VAR[PosterThumb]</texture>
|
||||
</control>
|
||||
<control type="image">
|
||||
<left>120</left>
|
||||
<top>5</top>
|
||||
<width>15</width>
|
||||
<height>15</height>
|
||||
<aspectratio>keep</aspectratio>
|
||||
<texture>$INFO[ListItem.Overlay]</texture>
|
||||
</control>
|
||||
<control type="image">
|
||||
<left>5</left>
|
||||
<top>170</top>
|
||||
<width>115</width>
|
||||
<height>5</height>
|
||||
<texture background="true">Progress\progress_$INFO[ListItem.Property(complete_percentage)].png</texture>
|
||||
<aspectratio>stretch</aspectratio>
|
||||
<colordiffuse>AAFFFFFF</colordiffuse>
|
||||
<visible>!IsEmpty(ListItem.Property(complete_percentage))</visible>
|
||||
</control>
|
||||
</itemlayout>
|
||||
<focusedlayout height="192" width="145">
|
||||
<control type="image">
|
||||
<left>0</left>
|
||||
<top>0</top>
|
||||
<width>125</width>
|
||||
<height>180</height>
|
||||
<bordertexture border="5">folder-focus.png</bordertexture>
|
||||
<bordersize>5</bordersize>
|
||||
<aspectratio>stretch</aspectratio>
|
||||
<texture background="true">$VAR[PosterThumb]</texture>
|
||||
</control>
|
||||
<control type="image">
|
||||
<left>120</left>
|
||||
<top>5</top>
|
||||
<width>15</width>
|
||||
<height>15</height>
|
||||
<aspectratio>keep</aspectratio>
|
||||
<texture>$INFO[ListItem.Overlay]</texture>
|
||||
</control>
|
||||
<control type="image">
|
||||
<left>5</left>
|
||||
<top>170</top>
|
||||
<width>115</width>
|
||||
<height>5</height>
|
||||
<texture background="true">Progress\progress_$INFO[ListItem.Property(complete_percentage)].png</texture>
|
||||
<aspectratio>stretch</aspectratio>
|
||||
<colordiffuse>AAFFFFFF</colordiffuse>
|
||||
<visible>!IsEmpty(ListItem.Property(complete_percentage))</visible>
|
||||
</control>
|
||||
</focusedlayout>
|
||||
|
||||
|
||||
|
||||
</control>
|
||||
<control type="scrollbar" id="759">
|
||||
<left>1235</left>
|
||||
<top>50</top>
|
||||
<width>25</width>
|
||||
<height>600</height>
|
||||
<texturesliderbackground border="0,14,0,14">ScrollBarV.png</texturesliderbackground>
|
||||
<texturesliderbar border="2,16,2,16">ScrollBarV_bar.png</texturesliderbar>
|
||||
<texturesliderbarfocus border="2,16,2,16">ScrollBarV_bar_focus.png</texturesliderbarfocus>
|
||||
<textureslidernib>ScrollBarNib.png</textureslidernib>
|
||||
<textureslidernibfocus>ScrollBarNib.png</textureslidernibfocus>
|
||||
<onleft>50</onleft>
|
||||
<onright>2</onright>
|
||||
<showonepage>false</showonepage>
|
||||
<orientation>vertical</orientation>
|
||||
<visible>true</visible>
|
||||
</control>
|
||||
</control>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</controls>
|
||||
</window>
|
||||
Reference in New Issue
Block a user