Ejemplo n.º 1
0
        public BasicModelMenu.BasicModelMenu GenerateArtists(List <FullArtist> followedArtists)
        {
            var artistsMenu = new BasicModelMenu.BasicModelMenu();
            int i           = 1;

            followedArtists.ForEach(artist =>
                                    artistsMenu.AddItem(artist.Name, _artistMenuFunctions.GetArtist, i++.ToString(), artist.Id));
            artistsMenu.AddItem("Exit", _exitFunctions.Exit, i.ToString(), null);
            return(artistsMenu);
        }
Ejemplo n.º 2
0
        public BasicModelMenu.BasicModelMenu GenerateAlbums(List <FullAlbum> albumList)
        {
            var albumsMenu = new BasicModelMenu.BasicModelMenu();
            int i          = 1;

            albumList.ForEach(simpleAlbum => albumsMenu.AddItem(
                                  $"{simpleAlbum.Artists[0].Name} - {simpleAlbum.Name}",
                                  _albumMenuFunctions.GetAlbum, i++.ToString(), simpleAlbum.Id));
            albumsMenu.AddItem("Exit", _exitFunctions.Exit, i.ToString(), null);
            return(albumsMenu);
        }
Ejemplo n.º 3
0
        public BasicModelMenu.BasicModelMenu GenerateTracks(List <SimpleTrack> trackList)
        {
            var tracksMenu = new BasicModelMenu.BasicModelMenu();
            int i          = 1;

            trackList.ForEach(fullTrack =>
            {
                var ts = TimeSpan.FromMilliseconds(fullTrack.DurationMs);
                tracksMenu.AddItem(
                    $"{fullTrack.Artists[0].Name} - {fullTrack.Name} {ts.Minutes}:{ts.Seconds}",
                    _trackMenuFunctions.GetTrack, i++.ToString(), fullTrack.Id);
            });

            tracksMenu.AddItem("Exit", _exitFunctions.Exit, i.ToString(), null);
            return(tracksMenu);
        }