aboutsummaryrefslogtreecommitdiff
path: root/subsonic-android
diff options
context:
space:
mode:
Diffstat (limited to 'subsonic-android')
-rw-r--r--subsonic-android/src/github/daneren2005/dsub/util/ShufflePlayBuffer.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/subsonic-android/src/github/daneren2005/dsub/util/ShufflePlayBuffer.java b/subsonic-android/src/github/daneren2005/dsub/util/ShufflePlayBuffer.java
index 51d86f74..56a710ea 100644
--- a/subsonic-android/src/github/daneren2005/dsub/util/ShufflePlayBuffer.java
+++ b/subsonic-android/src/github/daneren2005/dsub/util/ShufflePlayBuffer.java
@@ -108,9 +108,11 @@ public class ShufflePlayBuffer {
private void clearBufferIfnecessary() {
synchronized (buffer) {
final SharedPreferences prefs = Util.getPreferences(context);
- if (currentServer != Util.getActiveServer(context) || !currentFolder.equals(Util.getSelectedMusicFolderId(context))
- || !genre.equals(prefs.getString(Constants.PREFERENCES_KEY_SHUFFLE_GENRE, "")) || !startYear.equals(prefs.getString(Constants.PREFERENCES_KEY_SHUFFLE_START_YEAR, ""))
- || !endYear.equals(prefs.getString(Constants.PREFERENCES_KEY_SHUFFLE_END_YEAR, ""))) {
+ if (currentServer != Util.getActiveServer(context)
+ || (currentFolder != null && !currentFolder.equals(Util.getSelectedMusicFolderId(context)))
+ || (genre != null && !genre.equals(prefs.getString(Constants.PREFERENCES_KEY_SHUFFLE_GENRE, "")))
+ || (startYear != null && !startYear.equals(prefs.getString(Constants.PREFERENCES_KEY_SHUFFLE_START_YEAR, "")))
+ || (endYear != null && !endYear.equals(prefs.getString(Constants.PREFERENCES_KEY_SHUFFLE_END_YEAR, "")))) {
currentServer = Util.getActiveServer(context);
currentFolder = Util.getSelectedMusicFolderId(context);
genre = prefs.getString(Constants.PREFERENCES_KEY_SHUFFLE_GENRE, "");