Ejemplo n.º 1
0
 private async void EntryPlayClickExecute(BaseEntry item)
 {
     try
     {
         List <Song> queueSongs = null;
         if (item is Artist)
         {
             var artist = item as Artist;
             queueSongs = artist.Songs.ToList();
         }
         else if (item is Album)
         {
             var album = item as Album;
             queueSongs = album.Songs.ToList();
         }
         else if (item is Playlist)
         {
             var playlist = item as Playlist;
             queueSongs = playlist.Songs.Select(p => p.Song).ToList();
         }
         if (queueSongs != null && queueSongs.Count > 0)
         {
             await PlayAndQueueHelper.PlaySongsAsync(queueSongs[0], queueSongs, true);
         }
     }
     catch (Exception)
     {
     }
 }
Ejemplo n.º 2
0
 async void PlayTrackExecute(BaseEntry obj)
 {
     await PlayAndQueueHelper.PlaySongAsync(obj as Song);
 }