Playlist.Tracks.Count
Moderators: Gurus, Addon Administrators
Playlist.Tracks.Count
This method is pretty inefficient, especially if the playlist is a complex autoplaylist. Could we please have a "Playlist.TracksCount" method which just returned the count? This should be much more efficient as it doesn't need to return all the track data and build the SongList object.
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
Re: Playlist.Tracks.Count
We don't have any internal mechanism of getting track count of a playlist before its content is fully read from DB. I.e. in order to provide what you ask for, we'd have to implement it only because of this feature - which I wouldn't like to do, unless there's a very good reason why is such a performance improvement needed.
Jiri
Jiri
Re: Playlist.Tracks.Count
It would just make my "Custom Reports" script a bit quicker, that's all! 

Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
Re: Playlist.Tracks.Count
Trix,
For static playlists you could use SQL to retrieve the trackcount quicker. It won't work for autoplaylists though which probably is the biggest culprit here.
Jiri,
If http://www.ventismedia.com/mantis/view.php?id=6412 would be implemented, we could do the same for autoplaylists! Plus more cool things.
For static playlists you could use SQL to retrieve the trackcount quicker. It won't work for autoplaylists though which probably is the biggest culprit here.
Jiri,
If http://www.ventismedia.com/mantis/view.php?id=6412 would be implemented, we could do the same for autoplaylists! Plus more cool things.

Advanced Duplicate Find & Fix Find More From Same - Custom Search. | Transfer PlayStat & Copy-Paste Tags/AlbumArt between any tracks.
Tagging Inconsistencies Do you think you have your tags in order? Think again...
Play History & Stats Node Like having your Last-FM account stored locally, but more advanced.
Case & Leading Zero Fixer Works on filenames too!
All My Scripts
Tagging Inconsistencies Do you think you have your tags in order? Think again...
Play History & Stats Node Like having your Last-FM account stored locally, but more advanced.
Case & Leading Zero Fixer Works on filenames too!
All My Scripts
Re: Playlist.Tracks.Count
One more vote for GetAutoplaylistQuery.Bex wrote:Jiri,
If http://www.ventismedia.com/mantis/view.php?id=6412 would be implemented, we could do the same for autoplaylists! Plus more cool things.
However, I have one additional request, pretty please. It would be nice (if it is possible) to have SetAutoplaylistQuery as well.
● Magic Nodes 4.3.3 / 5.2 ● RegExp Find & Replace 4.4.9 / 5.2 ● Invert Selection/Select None 1.5.1 ● Export/Create Playlists for Child Nodes 4.1.1 / 5.4.1 ● Expand Child Nodes/Expand All 1.1.2 ● Event Logger 2.7 ● Filtered Statistics Report 1.6 ● Track Redirection & Synchronization 3.4.2 ● Restore/Synchronize Database 3.1.8 / 4.0.1 ● Find Currently Playing Track 1.3.2 ● Queue List 1.2.1 ● Add to Library on Play 1.0.1 ● Tree Report for Child Nodes 1.1.1 ● Update Location of Files in Database 1.4.5 / 2.3 ● Inherit Child Playlists 1.0.3 ● Add Currently Playing/Selected Track(s) to Playlist 1.2
Re: Playlist.Tracks.Count
Yeah, it's definitely autoplaylists which pose the problem, more so than static playlists.
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.