Selecting tracks in MainTracksWindow and Player
Posted: Wed Sep 16, 2009 4:17 pm
I've written a script that needs to change the list of selected tracks of either the MainTracksWindow or Player object. Currently I'm iterating over each item in the list and modifying the selection state of each. The problem is that this takes a really long time when there are a lot of tracks in the list. For example, if I'm viewing my entire library (50,000 tracks), it takes about 15 seconds to iterate over the list and change the selection.
Is there a better way of selecting a single track in the tracklist or now playing list within a script? I eventually need to retrieve the indices of the currently selected tracks of the list as well, so I imagine I will run into similar performance issues.
Is there a better way of selecting a single track in the tracklist or now playing list within a script? I eventually need to retrieve the indices of the currently selected tracks of the list as well, so I imagine I will run into similar performance issues.