forked from len0rd/rockbox
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);
|
||||
gCache.pos++;
|
||||
#if USING_STORAGE_CALLBACK
|
||||
rb->register_storage_idle_func(scrobbler_flush_callback);
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -466,7 +468,12 @@ void thread(void)
|
|||
gCache.force_flush = true;
|
||||
/*fall through*/
|
||||
case EV_EXIT:
|
||||
#if USING_STORAGE_CALLBACK
|
||||
rb->unregister_storage_idle_func(scrobbler_flush_callback, !in_usb);
|
||||
#else
|
||||
if (!in_usb)
|
||||
scrobbler_flush_cache();
|
||||
#endif
|
||||
return;
|
||||
case EV_OTHINSTANCE:
|
||||
scrobbler_flush_cache();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue