summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/menus/settings_menu.c4
-rw-r--r--apps/settings_list.c2
-rw-r--r--apps/tagcache.c2
-rw-r--r--apps/tagtree.c10
4 files changed, 16 insertions, 2 deletions
diff --git a/apps/menus/settings_menu.c b/apps/menus/settings_menu.c
index e609a4032e..cc3871a4d6 100644
--- a/apps/menus/settings_menu.c
+++ b/apps/menus/settings_menu.c
@@ -425,8 +425,10 @@ MAKE_MENU(hotkey_menu, ID2P(LANG_HOTKEY), 0, Icon_NOICON,
425/* SETTINGS MENU */ 425/* SETTINGS MENU */
426 426
427#ifdef HAVE_TAGCACHE 427#ifdef HAVE_TAGCACHE
428#if CONFIG_CODEC == SWCODEC
428MENUITEM_SETTING(autoresume_enable, &global_settings.autoresume_enable, NULL); 429MENUITEM_SETTING(autoresume_enable, &global_settings.autoresume_enable, NULL);
429#endif 430#endif
431#endif
430 432
431static struct browse_folder_info langs = { LANG_DIR, SHOW_LNG }; 433static struct browse_folder_info langs = { LANG_DIR, SHOW_LNG };
432 434
@@ -442,7 +444,9 @@ MAKE_MENU(settings_menu_item, ID2P(LANG_GENERAL_SETTINGS), 0,
442 &display_menu, &system_menu, 444 &display_menu, &system_menu,
443 &bookmark_settings_menu, 445 &bookmark_settings_menu,
444#ifdef HAVE_TAGCACHE 446#ifdef HAVE_TAGCACHE
447#if CONFIG_CODEC == SWCODEC
445 &autoresume_enable, 448 &autoresume_enable,
449#endif
446#endif 450#endif
447 &browse_langs, &voice_settings_menu, 451 &browse_langs, &voice_settings_menu,
448#ifdef HAVE_HOTKEY 452#ifdef HAVE_HOTKEY
diff --git a/apps/settings_list.c b/apps/settings_list.c
index 3da5f1db62..39de65c381 100644
--- a/apps/settings_list.c
+++ b/apps/settings_list.c
@@ -1257,11 +1257,13 @@ const struct settings_list settings[] = {
1257 ID2P(LANG_RANDOM)), 1257 ID2P(LANG_RANDOM)),
1258 1258
1259#ifdef HAVE_TAGCACHE 1259#ifdef HAVE_TAGCACHE
1260#if CONFIG_CODEC == SWCODEC
1260 BOOL_SETTING(0, autoresume_enable, LANG_AUTORESUME_ENABLE, false, 1261 BOOL_SETTING(0, autoresume_enable, LANG_AUTORESUME_ENABLE, false,
1261 "autoresume enable", off_on, 1262 "autoresume enable", off_on,
1262 LANG_AUTORESUME_ENABLE_YES, LANG_SET_BOOL_NO, NULL), 1263 LANG_AUTORESUME_ENABLE_YES, LANG_SET_BOOL_NO, NULL),
1263 OFFON_SETTING(0, runtimedb, LANG_RUNTIMEDB_ACTIVE, false, 1264 OFFON_SETTING(0, runtimedb, LANG_RUNTIMEDB_ACTIVE, false,
1264 "gather runtime data", NULL), 1265 "gather runtime data", NULL),
1266#endif
1265#endif 1267#endif
1266 1268
1267#if CONFIG_CODEC == SWCODEC 1269#if CONFIG_CODEC == SWCODEC
diff --git a/apps/tagcache.c b/apps/tagcache.c
index 1d90eee24b..b3a16a3c42 100644
--- a/apps/tagcache.c
+++ b/apps/tagcache.c
@@ -1695,12 +1695,14 @@ bool tagcache_fill_tags(struct mp3entry *id3, const char *filename)
1695 if (id3->bitrate == 0) 1695 if (id3->bitrate == 0)
1696 id3->bitrate = 1; 1696 id3->bitrate = 1;
1697 1697
1698#if CONFIG_CODEC == SWCODEC
1698 if (global_settings.autoresume_enable) 1699 if (global_settings.autoresume_enable)
1699 { 1700 {
1700 id3->offset = get_tag_numeric(entry, tag_lastoffset, idx_id); 1701 id3->offset = get_tag_numeric(entry, tag_lastoffset, idx_id);
1701 logf("tagcache_fill_tags: Set offset for %s to %lX\n", 1702 logf("tagcache_fill_tags: Set offset for %s to %lX\n",
1702 id3->title, id3->offset); 1703 id3->title, id3->offset);
1703 } 1704 }
1705#endif
1704 1706
1705 return true; 1707 return true;
1706} 1708}
diff --git a/apps/tagtree.c b/apps/tagtree.c
index 8ebac0b3a5..4673af38cf 100644
--- a/apps/tagtree.c
+++ b/apps/tagtree.c
@@ -170,7 +170,9 @@ static int current_entry_count;
170 170
171static struct tree_context *tc; 171static struct tree_context *tc;
172 172
173#if CONFIG_CODEC == SWCODEC
173extern bool automatic_skip; /* Who initiated in-progress skip? (C/A-) */ 174extern bool automatic_skip; /* Who initiated in-progress skip? (C/A-) */
175#endif
174 176
175static int get_token_str(char *buf, int size) 177static int get_token_str(char *buf, int size)
176{ 178{
@@ -677,7 +679,8 @@ static void tagtree_buffer_event(void *data)
677 679
678 logf("-> %ld/%ld", id3->playcount, id3->playtime); 680 logf("-> %ld/%ld", id3->playcount, id3->playtime);
679 } 681 }
680 682
683 #if CONFIG_CODEC == SWCODEC
681 if (global_settings.autoresume_enable) 684 if (global_settings.autoresume_enable)
682 { 685 {
683 /* Load current file resume offset if not already defined (by 686 /* Load current file resume offset if not already defined (by
@@ -690,7 +693,8 @@ static void tagtree_buffer_event(void *data)
690 str_or_empty(id3->title), id3->offset); 693 str_or_empty(id3->title), id3->offset);
691 } 694 }
692 } 695 }
693 696 #endif
697
694 /* Store our tagcache index pointer. */ 698 /* Store our tagcache index pointer. */
695 id3->tagcache_idx = tcs.idx_id+1; 699 id3->tagcache_idx = tcs.idx_id+1;
696 700
@@ -753,6 +757,7 @@ static void tagtree_track_finish_event(void *data)
753 tagcache_update_numeric(tagcache_idx, tag_lastplayed, lastplayed); 757 tagcache_update_numeric(tagcache_idx, tag_lastplayed, lastplayed);
754 } 758 }
755 759
760#if CONFIG_CODEC == SWCODEC
756 if (global_settings.autoresume_enable) 761 if (global_settings.autoresume_enable)
757 { 762 {
758 unsigned long offset 763 unsigned long offset
@@ -763,6 +768,7 @@ static void tagtree_track_finish_event(void *data)
763 logf("tagtree_track_finish_event: Save offset for %s: %lX", 768 logf("tagtree_track_finish_event: Save offset for %s: %lX",
764 str_or_empty(id3->title), offset); 769 str_or_empty(id3->title), offset);
765 } 770 }
771#endif
766} 772}
767 773
768bool tagtree_export(void) 774bool tagtree_export(void)