/// <summary> /// Keyed Dictionary<PlaylistID, Tuple<PlaylistName, Dictionary<SongHash, scrapedsong>>>. Yes I should just make a class. /// </summary> public override Dictionary <string, Tuple <string, Dictionary <string, ScrapedSong> > > GetSongsByPlaylist() { if (FeedType != BeatSaverFeeds.AUTHOR) { return(base.GetSongsByPlaylist()); } var dict = new Dictionary <string, Tuple <string, Dictionary <string, ScrapedSong> > >(); var songs = FeedReader.GetSongsFromFeed(FeedSettings); foreach (var song in songs) { var plID = PlaylistID + "_" + song.Value.MapperName.Replace(" ", ""); Tuple <string, Dictionary <string, ScrapedSong> > authorPL; if (!dict.ContainsKey(plID)) { authorPL = new Tuple <string, Dictionary <string, ScrapedSong> >($"Author {song.Value.MapperName}", new Dictionary <string, ScrapedSong>()); dict.Add(plID, authorPL); } else { authorPL = dict[plID]; } if (!authorPL.Item2.ContainsKey(song.Key)) { authorPL.Item2.Add(song.Key, song.Value); } } return(dict); }
/// <summary> /// Keyed Dictionary<PlaylistID, Tuple<PlaylistName, Dictionary<SongHash, scrapedsong>>>. Yes I should just make a class. /// </summary> public virtual Dictionary <string, Tuple <string, Dictionary <string, ScrapedSong> > > GetSongsByPlaylist() { var dict = new Dictionary <string, Tuple <string, Dictionary <string, ScrapedSong> > >(); dict.Add(PlaylistID, new Tuple <string, Dictionary <string, ScrapedSong> >(DisplayName, FeedReader.GetSongsFromFeed(FeedSettings))); return(dict); }