Playlist.Tracks.Count

Post a reply

Smilies
:D :) :( :o :-? 8) :lol: :x :P :oops: :cry: :evil: :roll: :wink:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Playlist.Tracks.Count

Re: Playlist.Tracks.Count

by trixmoto » Sat Oct 23, 2010 6:56 am

Yeah, it's definitely autoplaylists which pose the problem, more so than static playlists.

Re: Playlist.Tracks.Count

by ZvezdanD » Sat Oct 23, 2010 6:48 am

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. :)
One more vote for GetAutoplaylistQuery.

However, I have one additional request, pretty please. It would be nice (if it is possible) to have SetAutoplaylistQuery as well.

Re: Playlist.Tracks.Count

by Bex » Sat Oct 23, 2010 2:55 am

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. :)

Re: Playlist.Tracks.Count

by trixmoto » Thu Oct 21, 2010 4:38 am

It would just make my "Custom Reports" script a bit quicker, that's all! :)

Re: Playlist.Tracks.Count

by jiri » Wed Oct 20, 2010 10:06 pm

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

Playlist.Tracks.Count

by trixmoto » Wed Oct 20, 2010 1:19 pm

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.

Top