def real_remove_item(self, item, fully=False):    
     songs = self.get_item_songs(item)
     MediaDB.remove(songs)
     
     if fully:
         try:
             [ utils.move_to_trash(song.get("uri")) for song in songs if song.get_type() != "cue" ]
         except: pass    
Esempio n. 2
0
 def real_remove_item(self, item, fully=False):    
     songs = self.get_item_songs(item)
     MediaDB.remove(songs)
     
     if fully:
         try:
             [ utils.move_to_trash(song.get("uri")) for song in songs if song.get_type() != "cue" ]
         except: pass    
 def remove_songs(self, fully=False):
     if len(self.select_rows) > 0:
         songs = [ self.items[self.select_rows[index]].get_song() for index in range(0, len(self.select_rows))]
         MediaDB.remove(songs)    
         if fully:
             [ utils.move_to_trash(song.get("uri")) for song in songs if song.get_type() != "cue" ]
         self.delete_select_items()            
     return True    
Esempio n. 4
0
 def remove_songs(self, fully=False):
     if len(self.select_rows) > 0:
         songs = [ self.items[self.select_rows[index]].get_song() for index in range(0, len(self.select_rows))]
         MediaDB.remove(songs)    
         if fully:
             [ utils.move_to_trash(song.get("uri")) for song in songs if song.get_type() != "cue" ]
         self.delete_select_items()            
     return True    
 def move_to_trash(self):
     flag = False
     if len(self.select_rows) > 0:
         songs = [ self.items[self.select_rows[index]].get_song() for index in range(0, len(self.select_rows))]
         if self.highlight_item and self.highlight_item.get_song() in songs:
             Player.stop()
             self.highlight_item = None
             flag = True
         MediaDB.remove(songs)    
         [ utils.move_to_trash(song.get("uri")) for song in songs if song.get_type() != "cue"]
         self.delete_select_items()            
         if flag:
             Player.next()
     return True    
Esempio n. 6
0
 def move_to_trash(self):
     flag = False
     if len(self.select_rows) > 0:
         songs = [ self.items[self.select_rows[index]].get_song() for index in range(0, len(self.select_rows))]
         if self.highlight_item and self.highlight_item.get_song() in songs:
             Player.stop()
             self.highlight_item = None
             flag = True
         MediaDB.remove(songs)    
         [ utils.move_to_trash(song.get("uri")) for song in songs if song.get_type() != "cue"]
         self.delete_select_items()            
         if flag:
             Player.next()
     return True