Rockbox

This is the bug/patch tracker for Rockbox. Click here for more information.

Quick links: Bugs · Patches · Rockbox frontpage

Tasklist

FS#10403 - Random Folder Advance playlist generation

Attached to Project: Rockbox
Opened by Frank Gevaerts (fg) - Wednesday, 01 July 2009, 00:02 GMT+2
Last edited by Frank Gevaerts (fg) - Wednesday, 01 July 2009, 19:00 GMT+2
Task Type Patches
Category Plugins
Status Closed
Assigned To No-one
Player Type All players
Severity Low
Priority Normal
Reported Version Version 3.3
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
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 :)
   rfa-playlist.diff (4.1 KiB)
 apps/plugins/random_folder_advance_config.c |   65 ++++++++++++++++++++++++++++
 apps/plugin.c                               |    1 
 apps/plugin.h                               |    5 +-
 3 files changed, 70 insertions(+), 1 deletion(-)

This task depends upon

Closed by  Frank Gevaerts (fg)
Wednesday, 01 July 2009, 19:00 GMT+2
Reason for closing:  Accepted
Additional comments about closing:  committed as r21594
Comment by Jonathan Gordon (jdgordon) - Wednesday, 01 July 2009, 05:43 GMT+2
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, 16:05 GMT+2
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.
   rfa-playlist-2.diff (4.6 KiB)
 apps/plugins/random_folder_advance_config.c     |   72 ++++++++++++++++++++++++
 apps/plugin.c                                   |    1 
 apps/plugin.h                                   |    3 +
 manual/plugins/random_folder_advance_config.tex |    1 
 4 files changed, 77 insertions(+)

Comment by Jonathan Gordon (jdgordon) - Wednesday, 01 July 2009, 17:42 GMT+2
looks good
Comment by Frank Gevaerts (fg) - Wednesday, 01 July 2009, 18:47 GMT+2
Small cleanups
   rfa-playlist-3.diff (5 KiB)
 apps/plugins/random_folder_advance_config.c     |   70 ++++++++++++++++++++++++
 apps/plugin.c                                   |    1 
 apps/plugin.h                                   |    5 +
 manual/plugins/random_folder_advance_config.tex |    1 
 4 files changed, 76 insertions(+), 1 deletion(-)

Loading...