diff options
author | owner <owner@DeeDee-Laptop> | 2012-07-12 13:00:06 -0700 |
---|---|---|
committer | owner <owner@DeeDee-Laptop> | 2012-07-12 13:00:06 -0700 |
commit | eb5dc70027fa6921d179db12369ad188680cbf7d (patch) | |
tree | 6675d678ceb38570e75ff3a7ee2c02b971e34ded /subsonic-android | |
parent | 1b51a47f0e43403aa4d454d2775f325a2072255f (diff) | |
download | dsub-eb5dc70027fa6921d179db12369ad188680cbf7d.tar.gz dsub-eb5dc70027fa6921d179db12369ad188680cbf7d.tar.bz2 dsub-eb5dc70027fa6921d179db12369ad188680cbf7d.zip |
Fixed what the randomized playlist option was being applied to
Diffstat (limited to 'subsonic-android')
-rw-r--r-- | subsonic-android/src/github/daneren2005/subphonic/activity/MainActivity.java | 8 | ||||
-rw-r--r-- | subsonic-android/src/github/daneren2005/subphonic/service/DownloadServiceImpl.java | 10 |
2 files changed, 7 insertions, 11 deletions
diff --git a/subsonic-android/src/github/daneren2005/subphonic/activity/MainActivity.java b/subsonic-android/src/github/daneren2005/subphonic/activity/MainActivity.java index f7b8b6e6..ba1c2855 100644 --- a/subsonic-android/src/github/daneren2005/subphonic/activity/MainActivity.java +++ b/subsonic-android/src/github/daneren2005/subphonic/activity/MainActivity.java @@ -248,14 +248,10 @@ public class MainActivity extends SubsonicTabActivity { } } - private void showAlbumList(String type) { - // Get users desired random playlist size - SharedPreferences prefs = Util.getPreferences(this); - int size = Integer.parseInt(prefs.getString(Constants.PREFERENCES_KEY_RANDOM_SIZE, "10")); - + private void showAlbumList(String type) { Intent intent = new Intent(this, SelectAlbumActivity.class); intent.putExtra(Constants.INTENT_EXTRA_NAME_ALBUM_LIST_TYPE, type); - intent.putExtra(Constants.INTENT_EXTRA_NAME_ALBUM_LIST_SIZE, size); + intent.putExtra(Constants.INTENT_EXTRA_NAME_ALBUM_LIST_SIZE, 20); intent.putExtra(Constants.INTENT_EXTRA_NAME_ALBUM_LIST_OFFSET, 0); Util.startActivityWithoutTransition(this, intent); } diff --git a/subsonic-android/src/github/daneren2005/subphonic/service/DownloadServiceImpl.java b/subsonic-android/src/github/daneren2005/subphonic/service/DownloadServiceImpl.java index b4513b99..aec2963d 100644 --- a/subsonic-android/src/github/daneren2005/subphonic/service/DownloadServiceImpl.java +++ b/subsonic-android/src/github/daneren2005/subphonic/service/DownloadServiceImpl.java @@ -21,6 +21,7 @@ package github.daneren2005.subphonic.service; import android.app.Service; import android.content.Context; import android.content.Intent; +import android.content.SharedPreferences; import android.media.AudioManager; import android.media.MediaPlayer; import android.os.Handler; @@ -45,6 +46,7 @@ import java.util.Iterator; import java.util.List; import static github.daneren2005.subphonic.domain.PlayerState.*; +import github.daneren2005.subphonic.util.*; /** * @author Sindre Mehus @@ -232,10 +234,6 @@ public class DownloadServiceImpl extends Service implements DownloadService { @Override public synchronized void setShufflePlayEnabled(boolean enabled) { - if (shufflePlay == enabled) { - return; - } - shufflePlay = enabled; if (shufflePlay) { clear(); @@ -827,7 +825,9 @@ public class DownloadServiceImpl extends Service implements DownloadService { private synchronized void checkShufflePlay() { - final int listSize = 20; + // Get users desired random playlist size + SharedPreferences prefs = Util.getPreferences(this); + int listSize = Integer.parseInt(prefs.getString(Constants.PREFERENCES_KEY_RANDOM_SIZE, "20")); boolean wasEmpty = downloadList.isEmpty(); long revisionBefore = revision; |