Relocate scrobbling code
This commit is contained in:
parent
32ce1f7120
commit
827a626895
@ -429,6 +429,14 @@ public class PlaybackService extends Service implements Runnable, MediaPlayer.On
|
||||
intent.putExtra("song", song);
|
||||
sendBroadcast(intent);
|
||||
|
||||
if (mScrobble) {
|
||||
intent = new Intent("net.jjc1138.android.scrobbler.action.MUSIC_STATUS");
|
||||
intent.putExtra("playing", mState == STATE_PLAYING);
|
||||
if (song != null)
|
||||
intent.putExtra("id", song.id);
|
||||
sendBroadcast(intent);
|
||||
}
|
||||
|
||||
mLastSongBroadcast = song;
|
||||
}
|
||||
}
|
||||
@ -452,13 +460,6 @@ public class PlaybackService extends Service implements Runnable, MediaPlayer.On
|
||||
else
|
||||
stopForegroundCompat(cancelNotification);
|
||||
}
|
||||
|
||||
if (mScrobble) {
|
||||
Intent intent = new Intent("net.jjc1138.android.scrobbler.action.MUSIC_STATUS");
|
||||
intent.putExtra("playing", mState == STATE_PLAYING);
|
||||
intent.putExtra("id", song.id);
|
||||
sendBroadcast(intent);
|
||||
}
|
||||
}
|
||||
|
||||
private void retrieveSongs()
|
||||
|
Loading…
x
Reference in New Issue
Block a user