private async Task RemoveWachFolder() { try { if ((WatchFolder)lbWatchFolders.SelectedItem != null) { await WatchFolderRepo.Delete(((WatchFolder)lbWatchFolders.SelectedItem).Id); await MusicFileRepo.DeleteWatchFolder(((WatchFolder)lbWatchFolders.SelectedItem).Path); RepopulateAmountLables(); } } catch { } await BindWatchFoldersList(); QueueChecker.Queue = true; }
private async Task RemoveWachFolder() { try { if ((WatchFolder)lbWatchFolders.SelectedItem != null) { Logger.LogInfo("RemoveWachFolder", "Watch folder removed: " + ((WatchFolder)lbWatchFolders.SelectedItem).Path); await WatchFolderRepo.Delete(((WatchFolder)lbWatchFolders.SelectedItem).Id); await MusicFileRepo.DeleteWatchFolder(((WatchFolder)lbWatchFolders.SelectedItem).Path); RepopulateAmountLables(); } } catch (Exception e) { Logger.Log(e, "RemoveWachFolder"); } await BindWatchFoldersList(); Restart(); }