public Album(CloudAlbum cloud) : this() { Name = cloud.Name; ProviderId = cloud.ProviderId; CloudId = cloud.Id; Genre = cloud.Genre; ReleaseDate = cloud.ReleaseDate; if (cloud.PrimaryArtist != null) { PrimaryArtist = new Artist(cloud.PrimaryArtist); } }
public static async Task<bool> PinToggleAsync(Artist artist) { bool created; var id = "artist." + artist.Id; if (!SecondaryTile.Exists(id)) { Insights.Track( "Pin To Start", new Dictionary<string, string> { {"DisplayName", artist.Name}, {"ProviderId", artist.ProviderId}, {"Type", "Artist"} }); created = await CreatePin( id, artist.Name, "artists/" + artist.Id, string.Format(AppConstant.ArtistsArtworkPath, artist.Id)); } else { var secondaryTile = new SecondaryTile(id); created = !await secondaryTile.RequestDeleteAsync(); } return created; }
private static void ExitIfArtistEmpty(Artist artist) { if (App.Navigator.CurrentPage is CollectionArtistPage && artist.Songs.Count == 0) { App.Navigator.GoBack(); } }