--- misc/xbmc/plugin.video.todic/default.py 2011/12/04 15:06:39 1649
+++ misc/xbmc/plugin.video.todic/default.py 2011/12/12 17:50:21 1659
@@ -29,7 +29,7 @@
def rootMenu():
- buildList(__backend__, "") # call default list
+ buildList(__backend__, "", False) # call default list
# Adde xtra items to root menu
listitem = xbmcgui.ListItem(label = "Søg film ...", iconImage = 'DefaultFolder.png', thumbnailImage = 'DefaultFolder.png')
@@ -41,7 +41,7 @@
xbmcplugin.endOfDirectory(int(sys.argv[1]))
-def buildList(url,title):
+def buildList(url,title, endlist=True):
print '[TODIC]:'+str(url)
link = open_url(url)
ty=re.compile('(.+?)(.+?)(.+?)(.*)').findall(link)
l=len(m)
for name,url,thumb,description in m:
- infoLabels = {}
- infoLabels['title'] = name
- infoLabels['plot'] = description
listitem = xbmcgui.ListItem(label = name, label2='test', iconImage = 'DefaultFolder.png', thumbnailImage = thumb)
- listitem.setInfo('video', infoLabels)
listitem.setProperty('Fanart_Image', fanartImage)
+ if mode == '50':
+ infoLabels = {}
+ infoLabels['title'] = name
+ infoLabels['plot'] = description
+ listitem.setInfo('video', infoLabels)
u = sys.argv[0] + "?mode=" + urllib.quote_plus(mode) + "&name=" + urllib.quote_plus(name) + "&url=" + urllib.quote_plus(url)
ok = xbmcplugin.addDirectoryItem(handle = int(sys.argv[1]), url = u, listitem = listitem, isFolder = folder, totalItems = l)
- xbmcplugin.endOfDirectory(int(sys.argv[1]))
+
+ if (endlist == True):
+ xbmcplugin.endOfDirectory(int(sys.argv[1]))