aboutsummaryrefslogtreecommitdiff
path: root/subsonic-android
diff options
context:
space:
mode:
Diffstat (limited to 'subsonic-android')
-rw-r--r--subsonic-android/src/github/daneren2005/subphonic/activity/MainActivity.java8
-rw-r--r--subsonic-android/src/github/daneren2005/subphonic/service/DownloadServiceImpl.java10
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;