search results overwrite playlist (when searching entire filesystem)
keyword-searches performed on entire local media library replace playlist with new one built from search results. The new Playlist is supposed to have a backreference to the Playlist it replaced, but that's not working. Besides that, unloading the user's queue and queuing up Tracks from a search that may yield 1,000s of results and may not have even been intentional is a terrible idea.
results should be displayed within their own discreet listview to preserve the playlist-view, and to allow the results-view to be dismissed or maximized, etc without affecting the user's playlist
It is now possible to clear the search state and thereby restore your original queue. There are still pretty obscene performance issues with performing the search and displaying the results. The root(s) of the performance issues seems to be that
- The specified "media source" directories are scanned, recursively and in full, every time a global search is performed. No index or cache system is used. That's dumb
- The full TrackData is loaded (or created) for every media-item yielded by the scan.. Which is probably not necessary.
- Worst of all, the actual searching process doesn't even begin until all TrackData is loaded, and no results are displayed until the search is complete.
- I needs dem streams in mah life!
All of those are pretty obvious fixes, but a much better solution to the whole thing, in my opinion, is a well-designed, easily-extensible chunked "MediaCollection" system, which I've been working up to creating for some time.