public void Add(Song song) { if (song != null) { songPaths.Add(song.Path); this.outputSongs.Add(libraryDictionary[song.Path]); Sorting.AddSongToSortDictionaries(song, this.sortDictionaries); } }
public void Add(Song song) { if (song != null) { if (!pathDictionary.ContainsKey(song.Path)) { outputSongs.Add(song); this.pathDictionary.Add(song.Path, song); Sorting.AddSongToSortDictionaries(song, sortDictionaries); OnLibraryChanged(new LibraryChangedEventArgs()); } } }
public virtual void UpdateSongInfo(Song song) { //Remove from all dictionaries foreach (Dictionary <string, List <Song> > dictionary in this.sortDictionaries) { foreach (List <Song> list in dictionary.Values) { if (list.Contains(song)) { list.Remove(song); } } } Sorting.AddSongToSortDictionaries(song, this.sortDictionaries); }
public override void UpdateSongInfo(Song song) { //Remove from all dictionaries foreach (Dictionary <string, List <Song> > dictionary in this.sortDictionaries) { foreach (List <Song> list in dictionary.Values) { if (list.Contains(song)) { list.Remove(song); } } } if ((song.Rating == allowedRating) || (IncludeHigher && (song.Rating > allowedRating))) { Sorting.AddSongToSortDictionaries(song, this.sortDictionaries); } }