Esempio n. 1
0
 private Task DeleteLocalItem(MusicItem item)
 {
     return(TryFileDeletion(async() => {
         await LocalLibrary.Delete(item);
         // Updates the UI. Apparently, MusicFolder.MusicItems.Remove(item); does not update the UI.
         await RefreshCurrentFolder();
     }));
 }
Esempio n. 2
0
 protected void Delete(MusicItem song)
 {
     try {
         var shouldRemove = song.IsSourceLocal;
         LocalLibrary.Delete(song.Path);
         // refreshes the items in the current view
         if (shouldRemove)
         {
             MusicFolder.MusicItems.Remove(song);
         }
     } catch (Exception e) {
         Send("Unable to delete. Perhaps the file is in use. " + e.Message);
     }
 }