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, 10 insertions, 0 deletions
diff --git a/apps/tagtree.c b/apps/tagtree.c
index b5ec10b04f..4061e9d8d7 100644
--- a/apps/tagtree.c
+++ b/apps/tagtree.c
@@ -379,11 +379,17 @@ static void tagtree_unbuffer_event(struct mp3entry *id3, bool last_track)
379 379
380 /* Do not gather data unless proper setting has been enabled. */ 380 /* Do not gather data unless proper setting has been enabled. */
381 if (!global_settings.runtimedb) 381 if (!global_settings.runtimedb)
382 {
383 logf("runtimedb gathering not enabled");
382 return; 384 return;
385 }
383 386
384 /* Don't process unplayed tracks. */ 387 /* Don't process unplayed tracks. */
385 if (id3->elapsed == 0) 388 if (id3->elapsed == 0)
389 {
390 logf("not logging unplayed track");
386 return; 391 return;
392 }
387 393
388 if (!tagcache_find_index(&tcs, id3->path)) 394 if (!tagcache_find_index(&tcs, id3->path))
389 { 395 {
@@ -399,7 +405,11 @@ static void tagtree_unbuffer_event(struct mp3entry *id3, bool last_track)
399 405
400 lastplayed = tagcache_increase_serial(); 406 lastplayed = tagcache_increase_serial();
401 if (lastplayed < 0) 407 if (lastplayed < 0)
408 {
409 logf("incorrect tc serial:%d", lastplayed);
410 tagcache_search_finish(&tcs);
402 return; 411 return;
412 }
403 413
404 /* Ignore the last 15s (crossfade etc.) */ 414 /* Ignore the last 15s (crossfade etc.) */
405 playtime += MIN(id3->length, id3->elapsed + 15 * 1000); 415 playtime += MIN(id3->length, id3->elapsed + 15 * 1000);