forked from len0rd/rockbox
Provide the option to automatically update existing bookmark files on stop, without creating ones that don't already exist.
Idea from FS#6272, but implemented differently. If you set "Update on stop" then it will check if the bookmark file exists on stop, and if so, write a new one without prompting. If the file doesn't exist, it will do whatever the "Bookmark on stop" setting tells it to do. This works quite well if you have an audiobook/podcast/etc folder/playlist: just bookmark it manually once and it will get bookmarked automatically after that, without creating bookmarks for regular music. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27294 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
d265bcf965
commit
db1b823ac3
5 changed files with 24 additions and 1 deletions
|
|
@ -166,16 +166,21 @@ bool bookmark_mrb_load()
|
|||
bool bookmark_autobookmark(bool prompt_ok)
|
||||
{
|
||||
char* bookmark;
|
||||
bool update = false;
|
||||
if (!system_check())
|
||||
return false;
|
||||
|
||||
audio_pause(); /* first pause playback */
|
||||
if (global_settings.autoupdatebookmark && bookmark_exist())
|
||||
update = true;
|
||||
bookmark = create_bookmark();
|
||||
/* Workaround for inability to speak when paused: all callers will
|
||||
just do audio_stop() when we return, so we can do it right
|
||||
away. This makes it possible to speak the "Create a Bookmark?"
|
||||
prompt and the "Bookmark Created" splash. */
|
||||
audio_stop();
|
||||
if (update)
|
||||
return write_bookmark(true, bookmark);
|
||||
switch (global_settings.autocreatebookmark)
|
||||
{
|
||||
case BOOKMARK_YES:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue