summaryrefslogtreecommitdiff
path: root/apps/tagtree.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/tagtree.c')
-rw-r--r--apps/tagtree.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/apps/tagtree.c b/apps/tagtree.c
index 0625e860ab..f006baa581 100644
--- a/apps/tagtree.c
+++ b/apps/tagtree.c
@@ -879,7 +879,6 @@ static void tagtree_buffer_event(unsigned short id, void *ev_data)
879 logf("-> %ld/%ld", id3->playcount, id3->playtime); 879 logf("-> %ld/%ld", id3->playcount, id3->playtime);
880 } 880 }
881 881
882 #if CONFIG_CODEC == SWCODEC
883 if (autoresume) 882 if (autoresume)
884 { 883 {
885 /* Load current file resume info if not already defined (by 884 /* Load current file resume info if not already defined (by
@@ -900,7 +899,6 @@ static void tagtree_buffer_event(unsigned short id, void *ev_data)
900 str_or_empty(id3->title), id3->offset); 899 str_or_empty(id3->title), id3->offset);
901 } 900 }
902 } 901 }
903 #endif
904 902
905 /* Store our tagcache index pointer. */ 903 /* Store our tagcache index pointer. */
906 id3->tagcache_idx = tcs.idx_id+1; 904 id3->tagcache_idx = tcs.idx_id+1;
@@ -922,25 +920,20 @@ static void tagtree_track_finish_event(unsigned short id, void *ev_data)
922 } 920 }
923 tagcache_idx--; 921 tagcache_idx--;
924 922
925#if CONFIG_CODEC == SWCODEC /* HWCODEC doesn't have automatic_skip */
926 bool auto_skip = te->flags & TEF_AUTO_SKIP; 923 bool auto_skip = te->flags & TEF_AUTO_SKIP;
927#endif
928 bool runtimedb = global_settings.runtimedb; 924 bool runtimedb = global_settings.runtimedb;
929 bool autoresume = global_settings.autoresume_enable; 925 bool autoresume = global_settings.autoresume_enable;
930 926
931 /* Don't process unplayed tracks, or tracks interrupted within the 927 /* Don't process unplayed tracks, or tracks interrupted within the
932 first 15 seconds but always process autoresume point */ 928 first 15 seconds but always process autoresume point */
933 if (runtimedb && (id3->elapsed == 0 929 if (runtimedb && (id3->elapsed == 0
934#if CONFIG_CODEC == SWCODEC
935 || (id3->elapsed < 15 * 1000 && !auto_skip) 930 || (id3->elapsed < 15 * 1000 && !auto_skip)
936#endif
937 )) 931 ))
938 { 932 {
939 logf("not db logging unplayed or skipped track"); 933 logf("not db logging unplayed or skipped track");
940 runtimedb = false; 934 runtimedb = false;
941 } 935 }
942 936
943#if CONFIG_CODEC == SWCODEC
944 /* 3s because that is the threshold the WPS uses to rewind instead 937 /* 3s because that is the threshold the WPS uses to rewind instead
945 of skip backwards */ 938 of skip backwards */
946 if (autoresume && (id3->elapsed == 0 939 if (autoresume && (id3->elapsed == 0
@@ -949,7 +942,6 @@ static void tagtree_track_finish_event(unsigned short id, void *ev_data)
949 logf("not logging autoresume"); 942 logf("not logging autoresume");
950 autoresume = false; 943 autoresume = false;
951 } 944 }
952#endif
953 945
954 /* Do not gather data unless proper setting has been enabled and at least 946 /* Do not gather data unless proper setting has been enabled and at least
955 one is still slated to be recorded */ 947 one is still slated to be recorded */
@@ -987,7 +979,6 @@ static void tagtree_track_finish_event(unsigned short id, void *ev_data)
987 tagcache_update_numeric(tagcache_idx, tag_lastplayed, lastplayed); 979 tagcache_update_numeric(tagcache_idx, tag_lastplayed, lastplayed);
988 } 980 }
989 981
990#if CONFIG_CODEC == SWCODEC
991 if (autoresume) 982 if (autoresume)
992 { 983 {
993 unsigned long elapsed = auto_skip ? 0 : id3->elapsed; 984 unsigned long elapsed = auto_skip ? 0 : id3->elapsed;
@@ -998,7 +989,6 @@ static void tagtree_track_finish_event(unsigned short id, void *ev_data)
998 logf("tagtree_track_finish_event: Save resume for %s: %lX %lX", 989 logf("tagtree_track_finish_event: Save resume for %s: %lX %lX",
999 str_or_empty(id3->title), elapsed, offset); 990 str_or_empty(id3->title), elapsed, offset);
1000 } 991 }
1001#endif
1002} 992}
1003 993
1004int tagtree_export(void) 994int tagtree_export(void)