Selecting tracks in MainTracksWindow and Player

This forum is for questions / discussions regarding development of addons / tweaks for MediaMonkey for Windows 4.

Moderators: Gurus, Addon Administrators

flashk
Posts: 188
Joined: Sun Dec 11, 2005 5:04 pm

Selecting tracks in MainTracksWindow and Player

Post by flashk »

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.
flashk
Posts: 188
Joined: Sun Dec 11, 2005 5:04 pm

Re: Selecting tracks in MainTracksWindow and Player

Post by flashk »

It's probably too late, but would it be possible to add a new scripting feature before 3.2 is released?

As I mentioned in the above post, I want to programmatically select a single track in either the main tracks or now playing list. Currently, the only way to do this is to iterate over all tracks and clear the selected state of each item, then set the selected state for the single track. However, this is really slow when there are a lot of tracks in the list (ie. viewing the entire library).

It would be nice to have some sort of "SelectAll/UnselectAll" function, or a more efficient way to set the selection to a single track.
Post Reply