private WebAlbum CreateAlbum(string title, WebArtist artist, string artwork, List <WebSong> tracks = null) { return(new WebAlbum(GetType()) { Title = title, Artist = artist, Artwork = new Uri(artwork), Tracks = tracks }); }
private WebArtist CreateArtist(XboxArtist xboxArtist) { var artist = new WebArtist(GetType()) { Name = xboxArtist.Name, Token = xboxArtist.Id }; if (xboxArtist.ImageUrl == null) { artist.IsPartial = true; } else { artist.Artwork = new Uri(xboxArtist.ImageUrl); } return(artist); }
public void LoadAlbumsForArtist(WebArtist artist) { _parent.IsSearching = true; AlbumSearch.SearchForAlbumFromArtistGuidAsync(artist.Id, results => { _albums = results.ToList(); DispatcherHelper.CheckBeginInvokeOnUI(() => { _parent.IsSearching = false; this.SearchResults.Clear(); foreach (var album in _albums) { this.SearchResults.Add(album); } this.AlbumCount = String.Format("ALBUMS ({0})", _albums.Count()); this.IsAlbumsEnabled = true; }); }); }