private void AddToPlaylistExecute(BaseEntry item) { try { List <Song> addToPlaylistSongs = null; if (item is Artist) { var artist = item as Artist; if (artist.Songs.Count > 0) { addToPlaylistSongs = artist.Songs.Where(p => (!p.IsTemp)).ToList(); } } else if (item is Album) { var album = item as Album; if (album.Songs.Count > 0) { addToPlaylistSongs = album.Songs.Where(p => (!p.IsTemp)).ToList(); } } if (addToPlaylistSongs != null && addToPlaylistSongs.Count > 0) { AddToPlaylistPage.songs = addToPlaylistSongs; SheetUtility.OpenAddToPlaylistPage(); } } catch (Exception) { } }
public static void AddToPlaylist(List <Song> songs) { //var song = songs.Select(m => m as Song).ToList(); //if (song.Count == 0) return; AddToPlaylistPage.songs = songs; SheetUtility.OpenAddToPlaylistPage(); }