diff options
Diffstat (limited to 'apps/plugins/lastfm_scrobbler.c')
-rw-r--r-- | apps/plugins/lastfm_scrobbler.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/apps/plugins/lastfm_scrobbler.c b/apps/plugins/lastfm_scrobbler.c index db75427895..7ac620c2f0 100644 --- a/apps/plugins/lastfm_scrobbler.c +++ b/apps/plugins/lastfm_scrobbler.c | |||
@@ -355,7 +355,9 @@ static void scrobbler_add_to_cache(const struct mp3entry *id) | |||
355 | { | 355 | { |
356 | logf("Added %s", scrobbler_buf); | 356 | logf("Added %s", scrobbler_buf); |
357 | gCache.pos++; | 357 | gCache.pos++; |
358 | #if USING_STORAGE_CALLBACK | ||
358 | rb->register_storage_idle_func(scrobbler_flush_callback); | 359 | rb->register_storage_idle_func(scrobbler_flush_callback); |
360 | #endif | ||
359 | } | 361 | } |
360 | 362 | ||
361 | } | 363 | } |
@@ -466,7 +468,12 @@ void thread(void) | |||
466 | gCache.force_flush = true; | 468 | gCache.force_flush = true; |
467 | /*fall through*/ | 469 | /*fall through*/ |
468 | case EV_EXIT: | 470 | case EV_EXIT: |
471 | #if USING_STORAGE_CALLBACK | ||
469 | rb->unregister_storage_idle_func(scrobbler_flush_callback, !in_usb); | 472 | rb->unregister_storage_idle_func(scrobbler_flush_callback, !in_usb); |
473 | #else | ||
474 | if (!in_usb) | ||
475 | scrobbler_flush_cache(); | ||
476 | #endif | ||
470 | return; | 477 | return; |
471 | case EV_OTHINSTANCE: | 478 | case EV_OTHINSTANCE: |
472 | scrobbler_flush_cache(); | 479 | scrobbler_flush_cache(); |