Example #1
0
 /// <summary>
 /// The Ampache Song XML only provides an album and artist id, this operation
 /// hydrates the <see cref="AmpacheSong"/> with relevent album and artist information
 /// </summary>
 /// <param name="song">
 /// A <see cref="AmpacheSong"/>
 /// </param>
 /// <param name="album">
 /// A <see cref="AmpacheAlbum"/>
 /// </param>
 public static void Hydrate(this AmpacheSong song, AmpacheAlbum album, AmpacheArtist artist)
 {
     song.ArtistName     = artist.Name;
     song.ArtistNameSort = artist.NameSort;
     song.AlbumTitle     = album.Title;
     song.AlbumTitleSort = album.TitleSort;
 }
Example #2
0
        public PlayQueue(IEnumerable <AmpacheSong> nexts, IEnumerable <AmpacheSong> prevs)
        {
            var tmp = prevs.ToList();

            _playing = tmp.Count;
            tmp.AddRange(nexts);
            _playList = tmp;
            _first    = _playList[SafePlaying];
            _original = new List <AmpacheSong>(tmp).AsReadOnly();
        }
 public SongLabel(AmpacheSong song)
 {
     AmpacheId = song.Id;
     AlbumId = song.AlbumId;
     ArtistId = song.ArtistId;
     Url = song.Uri.AbsoluteUri;
     name = song.TrackTitle;
     artistName = song.ArtistName;
     albumName = song.AlbumTitle;
 }
 public SongLabel(AmpacheSong song)
 {
     AmpacheId  = song.Id;
     AlbumId    = song.AlbumId;
     ArtistId   = song.ArtistId;
     Url        = song.Uri.AbsoluteUri;
     name       = song.TrackTitle;
     artistName = song.ArtistName;
     albumName  = song.AlbumTitle;
 }