mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 02:27:39 -04:00
lastfm_scrobbler fix red for devices w/o storage callback
Change-Id: I2062534b6e2a82171b856cc76efe8b78dbf9b13c
This commit is contained in:
parent
fd15ea25d3
commit
f105ad7b23
1 changed files with 7 additions and 0 deletions
|
@ -355,7 +355,9 @@ static void scrobbler_add_to_cache(const struct mp3entry *id)
|
||||||
{
|
{
|
||||||
logf("Added %s", scrobbler_buf);
|
logf("Added %s", scrobbler_buf);
|
||||||
gCache.pos++;
|
gCache.pos++;
|
||||||
|
#if USING_STORAGE_CALLBACK
|
||||||
rb->register_storage_idle_func(scrobbler_flush_callback);
|
rb->register_storage_idle_func(scrobbler_flush_callback);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -466,7 +468,12 @@ void thread(void)
|
||||||
gCache.force_flush = true;
|
gCache.force_flush = true;
|
||||||
/*fall through*/
|
/*fall through*/
|
||||||
case EV_EXIT:
|
case EV_EXIT:
|
||||||
|
#if USING_STORAGE_CALLBACK
|
||||||
rb->unregister_storage_idle_func(scrobbler_flush_callback, !in_usb);
|
rb->unregister_storage_idle_func(scrobbler_flush_callback, !in_usb);
|
||||||
|
#else
|
||||||
|
if (!in_usb)
|
||||||
|
scrobbler_flush_cache();
|
||||||
|
#endif
|
||||||
return;
|
return;
|
||||||
case EV_OTHINSTANCE:
|
case EV_OTHINSTANCE:
|
||||||
scrobbler_flush_cache();
|
scrobbler_flush_cache();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue