public override IEnumerable <Item> Perform(IEnumerable <Item> items, IEnumerable <Item> modifierItems) { new Thread((ThreadStart) delegate { foreach (Item item in items) { string enqueue = ""; if (item is MusicItem) { foreach (SongMusicItem song in Exaile.LoadSongsFor(item as MusicItem)) { enqueue += string.Format("\"{0}\" ", song.File); } Exaile.Client(enqueue); } } }).Start(); return(null); }
public override IEnumerable <Item> ChildrenOfItem(Item parent) { if (IsExaile(parent)) { yield return(new BrowseAlbumsMusicItem()); yield return(new BrowseArtistsMusicItem()); foreach (Item item in ExaileRunnableItem.Items) { yield return(item); } } else if (parent is ArtistMusicItem) { foreach (AlbumMusicItem album in albums.Where(album => album.Artist.Contains(parent.Name))) { yield return(album); } } else if (parent is AlbumMusicItem) { foreach (SongMusicItem song in Exaile.LoadSongsFor(parent as AlbumMusicItem)) { yield return(song); } } else if (parent is BrowseAlbumsMusicItem) { foreach (AlbumMusicItem album in albums) { yield return(album); } } else if (parent is BrowseArtistsMusicItem) { foreach (ArtistMusicItem artist in artists) { yield return(artist); } } }