Relocate scrobbling code

This commit is contained in:
Christopher Eby 2010-03-19 10:27:45 -05:00
parent 32ce1f7120
commit 827a626895

View File

@ -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()