示例#1
0
 public void Add(Song song)
 {
     if (song != null)
     {
         songPaths.Add(song.Path);
         this.outputSongs.Add(libraryDictionary[song.Path]);
         Sorting.AddSongToSortDictionaries(song, this.sortDictionaries);
     }
 }
示例#2
0
 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());
         }
     }
 }
示例#3
0
        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);
        }
示例#4
0
        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);
            }
        }