Notice: A non well formed numeric value encountered in /sites/ on line 96 Notice: A non well formed numeric value encountered in /sites/ on line 96 Notice: A non well formed numeric value encountered in /sites/ on line 96 Deprecated: Function create_function() is deprecated in /sites/ on line 104 Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /sites/ on line 845 Deprecated: Function create_function() is deprecated in /sites/ on line 111 FS#7911 : Decouple playlist editting from the play/stop state



FS#7911 - Decouple playlist editting from the play/stop state

Attached to Project: Rockbox
Opened by Costas Calamvokis (cc) - Tuesday, 09 October 2007, 12:32 GMT
Task Type Patches
Category Playlists
Status Unconfirmed
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 3
Private No


This patch decouples playlist editting from the play/stop state. So,
you get the same playlist menu independent of whether rockbox is
playing or stopped (and all the commands do the same things). Also,
editting the playlist while stopped does not restart playback.

The idea behind this is that now the current playlist appears to
the user to be 'still there' when stopped (ie you can view it and
resume it), it doesn't make sense for an insert while stopped to
insert to an empty playlist.

I have done two patches, the first just makes the current playlist
menu available when stopped (no changes to the menu). The only changes
are to onplay.c and most of the changes were deletes, so the new code
is ~30 lines shorter than the original.

The second patch does the same as the first, but also:

1) it renames "Play Next" to "Replace"
2) it adds a "Replace shuffled" command
3) it renames "Insert" to "Insert in order" (and the same for queue)
4) it does not show the "Insert in order" order command until it is
useful: after an "Insert next" has already been done.

I think these changes make the playlist editing much easier to
understand for people new to rockbox (and easier to remember for those
not so new). In particular, the current "Insert" can do one of 3 different things (add to empty, insert next or insert after previous insert/ insert next). With the second patch all commands always do the same thing, and the renaming makes it a bit clearer what that thing is.

Anyone who wants to test this should probably also install - which fixes a bug in the "Insert next" code.

This task depends upon

Comment by Costas Calamvokis (cc) - Friday, 12 October 2007, 07:53 GMT

Changed "Insert in order" string to "Insert more" after suggestions on the forum.

Also tweaked to code to get the increase in binary size down to 76 bytes for this patch (e200 build).
Comment by Costas Calamvokis (cc) - Monday, 29 October 2007, 22:14 GMT

Fixed a bug with resume after replace while stopped.
Comment by Hardeep Sidhu (hardeeps) - Monday, 05 November 2007, 23:45 GMT
A couple of comments:

1. Allowing this means that the playlist after resuming may not be exactly the same as when it was stopped (it could be completely different in fact). I'm okay with that but wanted to make sure everyone else was. Also, what should the default resume behaviour be if you delete the current playing track while stopped? Reset to start of playlist?

2. In your second patch, what's the reason for relating "Insert in order" with "Insert next"? The two should work completely independently.
Comment by Steve Bavin (pondlife) - Tuesday, 06 November 2007, 09:49 GMT
If the current track is removed, playback should resume on the next track in the playlist.

One major point, I'd prefer "Play" and "Play Shuffled" rather than "Replace" and "Replace Shuffled". Also selecting these options should immediately start the file playing (currently it leaves the existing file playing or stays in the browswer while stopped. This is needed to maintain the current flexibility (e.g. select a directory when stopped and choose Insert Shuffled) so it's unlikely to be accepted without this.