diff options
Diffstat (limited to 'subsonic-android')
-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; } |