aboutsummaryrefslogtreecommitdiff
path: root/subsonic-android/src/github
diff options
context:
space:
mode:
authordaneren2005 <daneren2005@gmail.com>2013-07-08 13:08:55 -0700
committerdaneren2005 <daneren2005@gmail.com>2013-07-08 13:08:55 -0700
commita74776777857fd47ba2ea828f9e93a860c379393 (patch)
tree69ba7e5fa4d9e02d0504e9cf33fe67cc1a8b3f67 /subsonic-android/src/github
parent5ae2ee8cd070f837ec677664c6bdafa69dac70d3 (diff)
downloaddsub-a74776777857fd47ba2ea828f9e93a860c379393.tar.gz
dsub-a74776777857fd47ba2ea828f9e93a860c379393.tar.bz2
dsub-a74776777857fd47ba2ea828f9e93a860c379393.zip
Don't chain media players at all when gapless playback is set to off
Diffstat (limited to 'subsonic-android/src/github')
-rw-r--r--subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java b/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java
index eaac051e..ea9233f2 100644
--- a/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java
+++ b/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java
@@ -552,6 +552,12 @@ public class DownloadServiceImpl extends Service implements DownloadService {
}
synchronized void setNextPlaying() {
+ SharedPreferences prefs = Util.getPreferences(DownloadServiceImpl.this);
+ boolean gaplessPlayback = prefs.getBoolean(Constants.PREFERENCES_KEY_GAPLESS_PLAYBACK, true);
+ if(!gaplessPlayback) {
+ return;
+ }
+
int index = getCurrentPlayingIndex();
if (index != -1) {
switch (getRepeatMode()) {
@@ -1127,9 +1133,7 @@ public class DownloadServiceImpl extends Service implements DownloadService {
try {
setNextPlayerState(PREPARED);
- SharedPreferences prefs = Util.getPreferences(DownloadServiceImpl.this);
- boolean gaplessPlayback = prefs.getBoolean(Constants.PREFERENCES_KEY_GAPLESS_PLAYBACK, true);
- if(gaplessPlayback && Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN && (playerState == PlayerState.STARTED || playerState == PlayerState.PAUSED)) {
+ if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN && (playerState == PlayerState.STARTED || playerState == PlayerState.PAUSED)) {
mediaPlayer.setNextMediaPlayer(nextMediaPlayer);
nextSetup = true;
}