FS#6341 - Playlist completion creates bookmark

Attached to Project: Rockbox
Opened by Mike Holden (mikeholden) - Thursday, 16 November 2006, 11:17 GMT
Last edited by Magnus Holmgren (learman) - Wednesday, 22 August 2007, 16:35 GMT
Task Type Bugs
Category Music playback
Status Closed
Assigned To Magnus Holmgren (learman)
Operating System All players
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


Using today's daily build (061116).

I play a m3u playlist. When normal playback completes, a bookmark is created (I have bookmarking on stop set to auto), which is a couple of seconds before the end of the last song. If I play the playlist again, playback resumes a couple of seconds from the end of the last song, and then of course completes playback almost immediately.

I can work round this by either deleting the bookmark, setting it to ask, or not loading the bookmark on playback, but it's very annoying having to almost disable a very useful feature just to get "normal" use of the box.

basically a bookmark should only be created when the STOP button is pressed, not when normal playback completes.
This task depends upon

Closed by  Magnus Holmgren (learman)
Wednesday, 22 August 2007, 16:35 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fix committed, with some minor changes.
Comment by Stephane Doyon (sdoyon) - Tuesday, 21 November 2006, 14:54 GMT
This is not specific to H300, someone with permission might want to
change that.

I agree the current behavior is undesirable.

Currently it'll try to autobookmark on the main exit path out of
gui_wps_show(). Aside from the STOP action, this is basically when
audio_status() becomes 0. That might not make sense.

Other places that autobookmark: SYS_POWEROFF in gui_wps_show(), and
ACTION_TREE_STOP in dirbrowse().

Note that this means if you've gone to the file browser and left the
music playing, and then power off, no bookmark is saved. I've actually
been bitten by this once or twice.

When should it autobookmark? On STOP surely, in the WPS or file
browser. On power off too probably, at least if auto-resume is
disabled. What about other cases where playback is interrupted: entering
the recording screen or the radio, changing to another track from the
file browser or playlist viewer, starting a new playlist?

Anyway here's a small patch that does the following:
-Have WPS autobookmark only on STOP.
-Take the SYS_POWEROFF case out of gui_wps_show(), and have it
autobookmark inside clean_shutdown() instead, so it's done from any
-Have bookmark.c's system_check() prevent trying to bookmark if playback
isn't currently in progress.
Comment by Mike Holden (mikeholden) - Tuesday, 21 November 2006, 15:06 GMT
Forgot to mention when I logged this that this is only a recent problem. It used to work correctly some time recently, probably no more than a couple of weeks ago.

Unfortunately I don't have a dev environment, so am unable to test this patch.
Comment by Jonathan Gordon (jdgordon) - Saturday, 14 July 2007, 15:34 GMT
is this patch still required?