Searching via SDBApplication?
Posted: Sun Jan 11, 2015 10:50 pm
Hi, I'm a newbie C# programmer, so I'm still exploring what may be obvious things.
I can't seem to find a way to search an entire library via SDBApplication. I'm making a WPF application to help me organize my music (press this button to mark track as reviewed, press another button to combine these two playcounts favoring the one with the higher bitrate, make sure the song doesn't belong in any playlists, etc.)
I currently have an AutoPlaylist called "All" that contains my entire library. To search, I do this:
I iterate over every song in my library and shove it into a list and search through that. This obviously takes forever with large libraries (like mine), so could someone point me towards the actual search API?
I thought WebSearch was it, but I can't seem to understand it.
Thanks!
I can't seem to find a way to search an entire library via SDBApplication. I'm making a WPF application to help me organize my music (press this button to mark track as reviewed, press another button to combine these two playcounts favoring the one with the higher bitrate, make sure the song doesn't belong in any playlists, etc.)
I currently have an AutoPlaylist called "All" that contains my entire library. To search, I do this:
Code: Select all
AllSongs = MakeSongListEnumerable(SDB.PlaylistByTitle["All"].Tracks);
//============//
public static List<SDBSongData> MakeSongListEnumerable(SDBSongList songlist) {
var selectedSongList = new List<SDBSongData>();
foreach (var i in Enumerable.Range(0, songlist.Count)) {
selectedSongList.Add(songlist.Item[i]);
}
return selectedSongList;
}
I thought WebSearch was it, but I can't seem to understand it.
Thanks!