Project:Playlist (toolkit, modules)
Version:4.7.x-1.x-dev
Component:User interface
Category:bug report
Priority:normal
Assigned:hectorplus
Status:active

Issue Summary

...yet, there's only 5 files!

The paging at the bottom of the playlist shows there are more files, however, there arent more audio files!
Any dieas, help or fix? Thanks in advance.

Comments

#1

This happens when trying to sort by "name" and also by "time". It shouldn't happen with other sort methods.
I've known about it for awhile but haven't had a chance to debug. Check out the function in audio_playlist.module, audio_playlist_browser().

#2

Thanks for the explanation. I can live with it.

#3

I too have had this problem, but don't know how to fix it.

#4

If you noticed, this bug only occurs when the sort is by 'playtime' or without sort.
This is caused because pager_query tries to count the number of rows returned by the SQL query by replacing the "SELECT... FROM..." with "SELECT COUNT(*) FROM...". This works fine for simple queries, but not for complex ones. With these kind of queries you need to pass pager_query a parameter called $query_count with the SQL query to count the returned rows.

I have attached a text file with the function audio_playlist_browse in audio_playlist.module after the modifications (look for the $qry_cnt variable).

AttachmentSize
query_count.txt 6.3 KB