diff options
author | William Wilgus <wilgus.william@gmail.com> | 2022-03-26 03:20:49 -0400 |
---|---|---|
committer | William Wilgus <wilgus.william@gmail.com> | 2022-03-26 03:20:49 -0400 |
commit | f105ad7b23584607da11e867cde7e83968159366 (patch) | |
tree | 0fef1e6e59e6c5aeeed1e392cd82dbd7074ceb1f /apps/plugins/lastfm_scrobbler.c | |
parent | fd15ea25d3c22992f62c4d64d2ee891461d84d74 (diff) | |
download | rockbox-f105ad7b23584607da11e867cde7e83968159366.tar.gz rockbox-f105ad7b23584607da11e867cde7e83968159366.zip |
lastfm_scrobbler fix red for devices w/o storage callback
Change-Id: I2062534b6e2a82171b856cc76efe8b78dbf9b13c
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(); |