diff options
-rw-r--r-- | apps/scrobbler.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/apps/scrobbler.c b/apps/scrobbler.c index 6398fd1741..16869bf18f 100644 --- a/apps/scrobbler.c +++ b/apps/scrobbler.c | |||
@@ -224,7 +224,11 @@ int scrobbler_init(void) | |||
224 | 224 | ||
225 | scrobbler_cache = buffer_alloc(SCROBBLER_MAX_CACHE*SCROBBLER_CACHE_LEN); | 225 | scrobbler_cache = buffer_alloc(SCROBBLER_MAX_CACHE*SCROBBLER_CACHE_LEN); |
226 | 226 | ||
227 | #if CONFIG_CODEC == SWCODEC | ||
227 | playback_add_event(PLAYBACK_EVENT_TRACK_CHANGE, scrobbler_change_event); | 228 | playback_add_event(PLAYBACK_EVENT_TRACK_CHANGE, scrobbler_change_event); |
229 | #else | ||
230 | audio_set_track_changed_event(&scrobbler_change_event); | ||
231 | #endif | ||
228 | cache_pos = 0; | 232 | cache_pos = 0; |
229 | pending = false; | 233 | pending = false; |
230 | scrobbler_initialised = true; | 234 | scrobbler_initialised = true; |
@@ -259,7 +263,11 @@ void scrobbler_shutdown(void) | |||
259 | 263 | ||
260 | if (scrobbler_initialised) | 264 | if (scrobbler_initialised) |
261 | { | 265 | { |
266 | #if CONFIG_CODEC == SWCODEC | ||
262 | playback_remove_event(PLAYBACK_EVENT_TRACK_CHANGE, scrobbler_change_event); | 267 | playback_remove_event(PLAYBACK_EVENT_TRACK_CHANGE, scrobbler_change_event); |
268 | #else | ||
269 | audio_set_track_changed_event(NULL); | ||
270 | #endif | ||
263 | scrobbler_initialised = false; | 271 | scrobbler_initialised = false; |
264 | } | 272 | } |
265 | } | 273 | } |