diff options
author | Scott Jackson <daneren2005@gmail.com> | 2013-06-20 22:11:50 -0700 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2013-06-20 22:11:50 -0700 |
commit | 51e3c8143dddb8192b6c1aa035e70c462902b338 (patch) | |
tree | 63a9a8fd6d710d23f91a0f6bfdf567fef51c46df | |
parent | 3e4db0d6448ad1449675ef76d5ad21cb8f2d985c (diff) | |
download | dsub-51e3c8143dddb8192b6c1aa035e70c462902b338.tar.gz dsub-51e3c8143dddb8192b6c1aa035e70c462902b338.tar.bz2 dsub-51e3c8143dddb8192b6c1aa035e70c462902b338.zip |
Fixed song search queries for single level directories
-rw-r--r-- | subsonic-android/src/github/daneren2005/dsub/util/Util.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/subsonic-android/src/github/daneren2005/dsub/util/Util.java b/subsonic-android/src/github/daneren2005/dsub/util/Util.java index f138f97f..b7ff5604 100644 --- a/subsonic-android/src/github/daneren2005/dsub/util/Util.java +++ b/subsonic-android/src/github/daneren2005/dsub/util/Util.java @@ -393,7 +393,12 @@ public final class Util { name = "artist:\"" + title + "\" OR album:\"" + title + "\""; } } else { - String artist = "artist:\"" + details[details.length - 3] + "\""; + String artist; + if(details.length > 2) { + artist = "artist:\"" + details[details.length - 3] + "\""; + } else { + artist = "(artist:\"" + details[0] + "\" OR album:\"" + details[0] + "\")"; + } title = "title:\"" + title.substring(title.indexOf('-') + 1) + "\""; name = artist + " AND " + title; } |