Exemplo n.º 1
0
        private async Task <StackLayout> GetArtistAlbums()
        {
            var ArtistAlbums = await GetAlbumDetails.ByArtistId(ArtistId);

            var NumberOfAlbums = ArtistAlbums.Number_Of_Albums;
            var Artist         = ConvertJuxString.Decode(ArtistAlbums.Artist);
            var Albums         = ArtistAlbums.Albums;


            var stack = new StackLayout();
            await Task.Run(() =>
            {
                foreach (var Album in Albums)
                {
                    var albumView      = new AlbumView();
                    albumView.Artist   = Artist;
                    albumView.Album    = ConvertJuxString.Decode(Album.Title);
                    albumView.ImageUrl = Album.Album_Picture;
                    albumView.AlbumId  = Album.Id;
                    albumView.Year     = Album.Date;
                    stack.Children.Add(albumView);
                }
            });

            return(stack);
        }
Exemplo n.º 2
0
        private async Task <StackLayout> GetAlbum()
        {
            var Results = await GetAlbumDetails.ById(AlbumId);

            var    Album  = Results.AlbumInformation;
            var    Title  = ConvertJuxString.Decode(Album.Album);
            var    Artist = ConvertJuxString.Decode(Album.Artist);
            string Year   = Convert.ToDateTime(ConvertJuxString.Decode(Album.Date)).Year.ToString();


            var stack = new StackLayout();
            await Task.Run(() =>
            {
                var albumView      = new AlbumView();
                albumView.Artist   = Artist;
                albumView.Album    = Title;
                albumView.ImageUrl = Album.High_Quality_Picture;
                albumView.AlbumId  = AlbumId;
                albumView.Year     = Year;
                stack.Children.Add(albumView);
            });

            return(stack);
        }
Exemplo n.º 3
0
 public void GetAlbumDetailsTest()
 {
     GetAlbumDetails request = new GetAlbumDetails();
     var             result  = JsonConvert.DeserializeObject <KodiJSON.AudioLibrary.Response.GetAlbumDetailsResponse>(ExecuteTest.GetResponse(request));
 }