private void OnDownloadComplete(string search, bool success) { ActiveDownloads -= 1; if (!success) { MelonLogger.Warning("Download of " + search + " failed"); } if (ActiveDownloads > 0) { return; } if (!IsDownloadingMissing) { SongBrowser.ReloadSongList(); //EnableBackButton(); return; } PlaylistManager.SavePlaylistData(); //EnableBackButton(); if (IsDownloadingMissing) { IsDownloadingMissing = false; SongLoadingManager.EnableButtons(); PlaylistUtil.Popup("Missing playlist songs downloaded."); PopulatePlaylists(); SongBrowser.ReloadSongList(); } }
public void AddSong(string song) { if (songs.Contains(song)) { PlaylistUtil.Popup($"{song} already exists in playlist"); return; } songs.Add(song); songNames.Add(song, GetSongName(song)); downloadedDict.Add(song, true); }
public static void DeletePlaylist() { if (playlistToEdit is null) { MelonLogger.Msg("No playlist to edit selected"); return; } PlaylistUtil.Popup(playlistToEdit.name + " deleted"); ioHandler.DeletePlaylist(playlistToEdit.name); playlists.Remove(playlistToEdit.name); playlistToEdit = null; }
public void DownloadSingleSong(string filename, bool showPopup, GunButton button, TextMeshPro label) { if (backButton is null && button != null) { backButton = button; backButtonLabel = label; backButton.SetInteractable(false); backButtonLabel.text = "Loading.."; backButtonLabel.alpha = .25f; } if (showPopup) { PlaylistUtil.Popup("Downloading.."); } MelonCoroutines.Start(SongDownloader.DoSongWebSearch(filename, OnWebSearchDone, DifficultyFilter.All, false, 1, false, true)); }