mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 02:27:39 -04:00
move the scrobbler and playlist shutdown/restart calls out of tree.c and move them into the regular usb/shutdown handlers.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19124 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
aeb60e20a3
commit
ee1c231779
2 changed files with 3 additions and 4 deletions
|
@ -620,6 +620,8 @@ bool settings_parseline(char* line, char** name, char** value)
|
||||||
|
|
||||||
static void system_flush(void)
|
static void system_flush(void)
|
||||||
{
|
{
|
||||||
|
scrobbler_shutdown();
|
||||||
|
playlist_shutdown();
|
||||||
tree_flush();
|
tree_flush();
|
||||||
call_storage_idle_notifys(true); /*doesnt work on usb and shutdown from ata thread */
|
call_storage_idle_notifys(true); /*doesnt work on usb and shutdown from ata thread */
|
||||||
}
|
}
|
||||||
|
@ -627,6 +629,7 @@ static void system_flush(void)
|
||||||
static void system_restore(void)
|
static void system_restore(void)
|
||||||
{
|
{
|
||||||
tree_restore();
|
tree_restore();
|
||||||
|
scrobbler_init();
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool clean_shutdown(void (*callback)(void *), void *parameter)
|
static bool clean_shutdown(void (*callback)(void *), void *parameter)
|
||||||
|
@ -915,7 +918,6 @@ long default_event_handler_ex(long event, void (*callback)(void *), void *parame
|
||||||
(mmc_remove_request() == SYS_HOTSWAP_EXTRACTED))
|
(mmc_remove_request() == SYS_HOTSWAP_EXTRACTED))
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
scrobbler_flush_cache();
|
|
||||||
system_flush();
|
system_flush();
|
||||||
#ifdef BOOTFILE
|
#ifdef BOOTFILE
|
||||||
#if !defined(USB_NONE) && !defined(USB_IPODSTYLE)
|
#if !defined(USB_NONE) && !defined(USB_IPODSTYLE)
|
||||||
|
|
|
@ -1085,11 +1085,9 @@ static void ft_play_filename(char *dir, char *file)
|
||||||
/* These two functions are called by the USB and shutdown handlers */
|
/* These two functions are called by the USB and shutdown handlers */
|
||||||
void tree_flush(void)
|
void tree_flush(void)
|
||||||
{
|
{
|
||||||
scrobbler_shutdown();
|
|
||||||
#ifdef HAVE_TAGCACHE
|
#ifdef HAVE_TAGCACHE
|
||||||
tagcache_shutdown();
|
tagcache_shutdown();
|
||||||
#endif
|
#endif
|
||||||
playlist_shutdown();
|
|
||||||
|
|
||||||
#ifdef HAVE_TC_RAMCACHE
|
#ifdef HAVE_TC_RAMCACHE
|
||||||
tagcache_unload_ramcache();
|
tagcache_unload_ramcache();
|
||||||
|
@ -1141,5 +1139,4 @@ void tree_restore(void)
|
||||||
#ifdef HAVE_TAGCACHE
|
#ifdef HAVE_TAGCACHE
|
||||||
tagcache_start_scan();
|
tagcache_start_scan();
|
||||||
#endif
|
#endif
|
||||||
scrobbler_init();
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue