public override async void Execute(object parameter) { Locator.NavigationService.GoBack_HideFlyout(); Locator.NavigationService.Go(VLCPage.MusicPlayerPage); if (parameter is AlbumItem) { var album = parameter as AlbumItem; await PlaylistHelper.AddAlbumToPlaylist(album.Id, true, true, null, 0); } }
public override async void Execute(object parameter) { Locator.NavigationService.GoBack_HideFlyout(); Locator.NavigationService.Go(VLCPage.MusicPlayerPage); Locator.MusicLibraryVM.IsAlbumPageShown = false; TrackItem track = null; if (parameter is ItemClickEventArgs) { var args = parameter as ItemClickEventArgs; track = args.ClickedItem as TrackItem; } if (track == null) { // if the track is still null (for some reason), we need to break early. return; } await PlaylistHelper.AddAlbumToPlaylist(track.AlbumId, true, true, track); }