/// <summary> /// Remove Song from editing playlist /// </summary> /// <param name="levelId"></param> public void RemoveSongFromEditingPlaylist(IBeatmapLevel songInfo) { if (this.CurrentEditingPlaylist == null) { return; } this.CurrentEditingPlaylist.Songs.RemoveAll(x => x.LevelId == songInfo.levelID); this.CurrentEditingPlaylistLevelIds.Remove(songInfo.levelID); PlaylistWriter.WritePlaylist(this.CurrentEditingPlaylist, this.CurrentEditingPlaylist.Path); }
/// <summary> /// Add Song to Editing Playlist /// </summary> /// <param name="songInfo"></param> public void AddSongToEditingPlaylist(IBeatmapLevel songInfo) { if (this.CurrentEditingPlaylist == null) { return; } this.CurrentEditingPlaylist.Songs.Add(new PlaylistSong() { SongName = songInfo.songName, LevelId = songInfo.levelID, Key = _levelIdToSongVersion.ContainsKey(songInfo.levelID) ? _levelIdToSongVersion[songInfo.levelID] : songInfo.levelID, }); this.CurrentEditingPlaylistLevelIds.Add(songInfo.levelID); PlaylistWriter.WritePlaylist(this.CurrentEditingPlaylist, this.CurrentEditingPlaylist.Path); }