Esempio n. 1
0
        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);
            }
        }
Esempio n. 2
0
        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;
        }
Esempio n. 3
0
 private static void ExitIfArtistEmpty(Artist artist)
 {
     if (App.Navigator.CurrentPage is CollectionArtistPage && artist.Songs.Count == 0)
     {
         App.Navigator.GoBack();
     }
 }