diff options
Diffstat (limited to 'subsonic-android/src/github')
-rw-r--r-- | subsonic-android/src/github/daneren2005/dsub/service/RESTMusicService.java | 6 | ||||
-rw-r--r-- | subsonic-android/src/github/daneren2005/dsub/util/ShufflePlayBuffer.java | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/subsonic-android/src/github/daneren2005/dsub/service/RESTMusicService.java b/subsonic-android/src/github/daneren2005/dsub/service/RESTMusicService.java index 6a33e60d..627ad915 100644 --- a/subsonic-android/src/github/daneren2005/dsub/service/RESTMusicService.java +++ b/subsonic-android/src/github/daneren2005/dsub/service/RESTMusicService.java @@ -506,15 +506,15 @@ public class RESTMusicService implements MusicService { names.add("musicFolderId"); values.add(musicFolderId); } - if(genre != null && genre != "") { + if(genre != null && !genre.isEmpty()) { names.add("genre"); values.add(genre); } - if(startYear != null && startYear != "") { + if(startYear != null && !startYear.isEmpty()) { names.add("fromYear"); values.add(startYear); } - if(endYear != null && endYear != "") { + if(endYear != null && !endYear.isEmpty()) { names.add("toYear"); values.add(endYear); } diff --git a/subsonic-android/src/github/daneren2005/dsub/util/ShufflePlayBuffer.java b/subsonic-android/src/github/daneren2005/dsub/util/ShufflePlayBuffer.java index 3c9ccc58..51d86f74 100644 --- a/subsonic-android/src/github/daneren2005/dsub/util/ShufflePlayBuffer.java +++ b/subsonic-android/src/github/daneren2005/dsub/util/ShufflePlayBuffer.java @@ -108,9 +108,9 @@ public class ShufflePlayBuffer { private void clearBufferIfnecessary() { synchronized (buffer) { final SharedPreferences prefs = Util.getPreferences(context); - if (currentServer != Util.getActiveServer(context) || currentFolder != Util.getSelectedMusicFolderId(context) - || genre != prefs.getString(Constants.PREFERENCES_KEY_SHUFFLE_GENRE, "") || startYear != prefs.getString(Constants.PREFERENCES_KEY_SHUFFLE_START_YEAR, "") - || endYear != prefs.getString(Constants.PREFERENCES_KEY_SHUFFLE_END_YEAR, "")) { + 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, ""))) { currentServer = Util.getActiveServer(context); currentFolder = Util.getSelectedMusicFolderId(context); genre = prefs.getString(Constants.PREFERENCES_KEY_SHUFFLE_GENRE, ""); |