Rockbox

Tasklist

FS#10403 - Random Folder Advance playlist generation

Attached to Project: Rockbox
Opened by Frank Gevaerts (fg) - Tuesday, 30 June 2009, 22:02 GMT
Last edited by Frank Gevaerts (fg) - Wednesday, 01 July 2009, 17:00 GMT
Task Type Patches
Category Plugins
Status Closed
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version Version 3.3
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

This patch adds a "Play Shuffled" menu item to random_folder_advance_config, which adds all configured configured directories to the current playlist in random order (tracks within a directory remain in "normal" order)

It somewhat works:
- Sometimes a proper playlist control file is generated, and "resume playback" will start this big random-folder playlist
- Sometimes the player freezes after exiting the plugin
- Sometimes "resume playback" complains about a corrupt playlist control file
- In the cases where it works, the previous playlist isn't always cleared, and playback doesn't start at the beginning.

Further help is welcome :)
This task depends upon

Closed by  Frank Gevaerts (fg)
Wednesday, 01 July 2009, 17:00 GMT
Reason for closing:  Accepted
Additional comments about closing:  committed as r21594
Comment by Jonathan Gordon (jdgordon) - Wednesday, 01 July 2009, 03:43 GMT
looks ok... my main suggestion would be to create a new .m3u(8) instead of using the "current" playlist.
(going by memory here...)
shouldnt you do playlist_new() or_create() or whatever its called instead of remove_all_tracks()? also you arn't stopping playback.. and thikning baout all that, all those "someetimes" make sense. depends on what playlist_remove_all_tracks(NULL) does it might very well leave you with a busted control file and/or resume info in global_status.
Comment by Frank Gevaerts (fg) - Wednesday, 01 July 2009, 14:05 GMT
This one seems to actually work properly. It immediately starts playback, and exits the plugin (which seems like the safe thing to do, since starting playback will re-grab the audio buffer so what the plugin thinks is in there will bve wrong).

The new menu item is now also documented in the manual.
Comment by Jonathan Gordon (jdgordon) - Wednesday, 01 July 2009, 15:42 GMT
looks good
Comment by Frank Gevaerts (fg) - Wednesday, 01 July 2009, 16:47 GMT
Small cleanups

Loading...