Exemple #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);
     }
 }
Exemple #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());
         }
     }
 }
Exemple #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);
        }
Exemple #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);
            }
        }