diff options
author | Scott Jackson <daneren2005@gmail.com> | 2013-01-18 18:00:50 -0800 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2013-01-18 18:00:50 -0800 |
commit | 77d3088273dea71fe6fa79e3e57648dbf805eb89 (patch) | |
tree | 0b759e742b758df059c41c23164b19f0d25dc21d | |
parent | 78413c00035e7457b425f09df76415e7eb4737c5 (diff) | |
download | dsub-77d3088273dea71fe6fa79e3e57648dbf805eb89.tar.gz dsub-77d3088273dea71fe6fa79e3e57648dbf805eb89.tar.bz2 dsub-77d3088273dea71fe6fa79e3e57648dbf805eb89.zip |
Closes #94 In java == doesn't actually compare in some cases...
-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, ""); |