public ArtistInformation(IArtist artist, Dispatcher dispatcher) { _portraits = new NotifyCollection<BitmapSource>(); _tracks = new NotifyCollection<Track>(); _albums = new NotifyCollection<Album>(); _similarArtists = new NotifyCollection<Artist>(); _dispatcher = dispatcher; _artist = artist; _browse = _artist.Browse(); _isLoading = !_browse.IsComplete; _browse.Completed += ArtistBrowseCompleted; }
public ArtistQueue(IArtist artist) { _tracks = new List <ITrack>(); var browse = artist.Browse(); browse.WaitForCompletion(); foreach (var track in browse.Tracks) { track.Load(); track.WaitUntilLoaded(); if (track.Availability == TrackAvailablity.Available) { _tracks.Add(track); } } _tracks = _tracks.OrderByDescending((t) => t.Popularity).ToList(); }