Commits

Damián Nohales  committed 36cd7ce

Bug fixed on download resume.

  • Participants
  • Parent commits f56eebd

Comments (0)

Files changed (2)

File lib/SharkDown.py

         """
         iter = self.downloads.first()
         while iter != None:
-            self.downloads.get_song(iter).set_state(Song.STATE_NOT_STARTED)
+            self.downloads.get_song(iter).reset_unfinished_download_state()
             iter = self.downloads.next(iter)
 
     def on_clear_downloadlist(self, widget, data = None):
         """
         select = self.downloads.get_selected_rows()
         for path in select:
-            self.downloads.get_song(path).set_state(Song.STATE_NOT_STARTED)
+            self.downloads.get_song(path).reset_unfinished_download_state()
 
     def on_love_song(self, button):
         if self.get_playing_song() == None:
         """
         if self.is_downloading() == False and self.state != Song.STATE_COMPLETED:
             self.start_download(False)
+    
+    def reset_unfinished_download_state(self):
+        if self.is_downloading() == False and self.state != Song.STATE_COMPLETED:
+            self.set_state(Song.STATE_NOT_STARTED)
         
     def pause_download_sync(self):
         """