1
0
Fork 0
forked from len0rd/rockbox

LastFm remove scrobbler from core make a TSR plugin WIP

remove scrobbler from core make it a plugin

Change-Id: I606810eba7d570dfb332789aed913c6f8adc7fb7
This commit is contained in:
William Wilgus 2022-03-25 09:33:10 -04:00
parent 8eb4689ab1
commit fd15ea25d3
12 changed files with 591 additions and 355 deletions

View file

@ -31,7 +31,6 @@
#include "sound_menu.h"
#include "kernel.h"
#include "playlist.h"
#include "scrobbler.h"
#include "audio.h"
#include "cuesheet.h"
#include "misc.h"
@ -150,26 +149,6 @@ MENUITEM_SETTING(spdif_enable, &global_settings.spdif_enable, NULL);
MENUITEM_SETTING(next_folder, &global_settings.next_folder, NULL);
MENUITEM_SETTING(constrain_next_folder,
&global_settings.constrain_next_folder, NULL);
static int audioscrobbler_callback(int action,
const struct menu_item_ex *this_item,
struct gui_synclist *this_list)
{
(void)this_item;
(void)this_list;
switch (action)
{
case ACTION_EXIT_MENUITEM: /* on exit */
if (!scrobbler_is_enabled() && global_settings.audioscrobbler)
scrobbler_init();
if(scrobbler_is_enabled() && !global_settings.audioscrobbler)
scrobbler_shutdown(false);
break;
}
return action;
}
MENUITEM_SETTING(audioscrobbler, &global_settings.audioscrobbler, audioscrobbler_callback);
static int cuesheet_callback(int action,
const struct menu_item_ex *this_item,
@ -242,7 +221,7 @@ MAKE_MENU(playback_settings,ID2P(LANG_PLAYBACK),0,
#ifdef HAVE_SPDIF_POWER
&spdif_enable,
#endif
&next_folder, &constrain_next_folder, &audioscrobbler, &cuesheet
&next_folder, &constrain_next_folder, &cuesheet
#ifdef HAVE_HEADPHONE_DETECTION
,&unplug_menu
#endif