Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Diff of /plugin.audio.podcatcher/simplexbmc.py [56d837] .. [7f6c5e] Maximize Restore

  Switch to side-by-side view

--- a/plugin.audio.podcatcher/simplexbmc.py
+++ b/plugin.audio.podcatcher/simplexbmc.py
@@ -62,7 +62,7 @@
       });
     return liz;
   
-  def buildMenuEntry(self, menuElement ):
+  def buildMenuEntry(self, menuElement, elementCount ):
     if(self.path == ""):
       path = "%d"%(self.counter);
     else:
@@ -90,11 +90,10 @@
         ]
       liz.addContextMenuItems(contextMenuEntries,True)
       u = "%s?path=%s&action=browse" % (sys.argv[0],path)
-      xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]),url=u,listitem=liz,isFolder=True)
+      xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]),url=u,listitem=liz,isFolder=True,totalItems = elementCount)
     self.counter+=1;
   
   def play(self, playableObject):
-    xbmc.executebuiltin("Playlist.Clear");
     player = xbmc.Player();
     playerItem = xbmcgui.ListItem(playableObject.title)
     if(type(playableObject).__name__ == 'FeedItem'):
@@ -104,11 +103,12 @@
       items = [];
       playableObject.getAllUnreadItems(items);
       playlist = xbmc.PlayList(xbmc.PLAYLIST_MUSIC)
+      playlist.clear();
       for item in items:
         listItem = self.buildMediaItem(item,False);
         playlist.add(url=item.link, listitem=listItem)
       
-      player.play(playlist,playerItem);
+      player.play(playlist, playerItem);
       xbmc.executebuiltin("ActivateWindow(musicplaylist)");
   
   def openMenuContext(self):
@@ -117,6 +117,7 @@
   
   def closeMenuContext(self):
     xbmcplugin.endOfDirectory(int(sys.argv[1]))
+    
   def refresh(self):
     xbmc.executebuiltin("Container.Refresh")