/[projects]/misc/xbmc/plugin.video.todic/default.py
ViewVC logotype

Diff of /misc/xbmc/plugin.video.todic/default.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1648 by torben, Sun Dec 4 14:40:44 2011 UTC revision 1649 by torben, Sun Dec 4 15:06:39 2011 UTC
# Line 28  def open_url(url): Line 28  def open_url(url):
28          return data          return data
29    
30  def rootMenu():  def rootMenu():
         link = open_url(__backend__)  
         m=re.compile('<title>(.+?)</title><url>(.+?)</url>').findall(link)  
         l = len(m)  
         for name,url in m:  
                 listitem = xbmcgui.ListItem(label = name, iconImage = 'DefaultFolder.png', thumbnailImage = 'DefaultFolder.png')  
                 listitem.setProperty('Fanart_Image', fanartImage)  
31    
32                  u = sys.argv[0] + "?mode=1&name=" + urllib.quote_plus(name) + "&url=" + urllib.quote_plus(url)          buildList(__backend__, "") # call default list
                 ok = xbmcplugin.addDirectoryItem(handle = int(sys.argv[1]), url = u, listitem = listitem, isFolder = True, totalItems = l)  
33    
34            # Adde xtra items to root menu
35          listitem = xbmcgui.ListItem(label = "Søg film ...", iconImage = 'DefaultFolder.png', thumbnailImage = 'DefaultFolder.png')          listitem = xbmcgui.ListItem(label = "Søg film ...", iconImage = 'DefaultFolder.png', thumbnailImage = 'DefaultFolder.png')
36          listitem.setProperty('Fanart_Image', fanartImage)          listitem.setProperty('Fanart_Image', fanartImage)
37    
38          u = sys.argv[0] + "?mode=10&name=" + urllib.quote_plus(name)          u = sys.argv[0] + "?mode=10&name="
39          ok = xbmcplugin.addDirectoryItem(handle = int(sys.argv[1]), url = u, listitem = listitem, isFolder = True, totalItems = l)          ok = xbmcplugin.addDirectoryItem(handle = int(sys.argv[1]), url = u, listitem = listitem, isFolder = True)
40    
41          xbmcplugin.endOfDirectory(int(sys.argv[1]))          xbmcplugin.endOfDirectory(int(sys.argv[1]))
42    

Legend:
Removed from v.1648  
changed lines
  Added in v.1649

  ViewVC Help
Powered by ViewVC 1.1.20