read lists only if all downloads finished or failed
authorNabil Hanna <ali@users.schwerkraft.elitedvb.net>
Wed, 12 Aug 2009 06:13:00 +0000 (06:13 +0000)
committerNabil Hanna <ali@users.schwerkraft.elitedvb.net>
Wed, 12 Aug 2009 06:13:00 +0000 (06:13 +0000)
rsdownloader/src/plugin.py

index 82b10cc..8db1928 100644 (file)
@@ -354,9 +354,17 @@ class RS():
                                else:\r
                                        return False
 
+       def allDownloadsFinished(self):
+               allDone = True
+               for download in self.downloads:
+                       if (download.status != _("Failed")) and (download.status != _("Finished")):
+                               allDone = False
+               return allDone
+
        def startDownloading(self):
                if self.mayDownload() == True:
-                       self.readLists()
+                       if self.allDownloadsFinished() == True:
+                               self.readLists()
                        downloadCount = 0
                        for download in self.downloads:
                                if download.downloading == True: