--- misc/xbmc/plugin.video.todic/default.py 2011/11/27 11:01:27 1629
+++ misc/xbmc/plugin.video.todic/default.py 2011/11/27 11:05:43 1630
@@ -27,10 +27,11 @@
def rootMenu():
link = open_url(__backend__)
m=re.compile('
(.+?)(.+?)').findall(link)
+ l = len(m)
for name,url in m:
listitem = xbmcgui.ListItem(label = name, iconImage = 'DefaultFolder.png', thumbnailImage = 'DefaultFolder.png')
u = sys.argv[0] + "?mode=1&name=" + urllib.quote_plus(name) + "&url=" + urllib.quote_plus(url)
- ok = xbmcplugin.addDirectoryItem(handle = int(sys.argv[1]), url = u, listitem = listitem, isFolder = True)
+ ok = xbmcplugin.addDirectoryItem(handle = int(sys.argv[1]), url = u, listitem = listitem, isFolder = True, totalItems = l)
xbmcplugin.endOfDirectory(int(sys.argv[1]))
@@ -40,6 +41,7 @@
ty=re.compile('(.+?)(.+?)(.+?)').findall(link)
+ l=len(m)
for name,url,thumb in m:
if ty[0] == 'clipList':
mode = '50'
@@ -50,17 +52,18 @@
listitem = xbmcgui.ListItem(label = name, iconImage = 'DefaultFolder.png', thumbnailImage = thumb)
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)
+ ok = xbmcplugin.addDirectoryItem(handle = int(sys.argv[1]), url = u, listitem = listitem, isFolder = folder, totalItems = l)
xbmcplugin.endOfDirectory(int(sys.argv[1]))
def buildSubList(url,title):
print '[TODIC]:'+str(url)
link = open_url(url)
m=re.compile('(.+?)(.+?)(.+?)').findall(link)
+ l = len(m)
for name,url,thumb in m:
listitem = xbmcgui.ListItem(label = name, iconImage = 'DefaultFolder.png', thumbnailImage = thumb)
u = sys.argv[0] + "?mode=50&name=" + urllib.quote_plus(name) + "&url=" + urllib.quote_plus(url)
- ok = xbmcplugin.addDirectoryItem(handle = int(sys.argv[1]), url = u, listitem = listitem, isFolder = False)
+ ok = xbmcplugin.addDirectoryItem(handle = int(sys.argv[1]), url = u, listitem = listitem, isFolder = False, totalItems = l)
xbmcplugin.endOfDirectory(int(sys.argv[1]))