From 69e5a58dae101bdadf5eaa791ca02621767d430a Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Wed, 19 Jun 2013 21:14:21 -0700 Subject: parseOfflineID for case when album == artist, know that it is the album they are looking for --- subsonic-android/src/github/daneren2005/dsub/util/Util.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/subsonic-android/src/github/daneren2005/dsub/util/Util.java b/subsonic-android/src/github/daneren2005/dsub/util/Util.java index 98b9fc42..a90c329a 100644 --- a/subsonic-android/src/github/daneren2005/dsub/util/Util.java +++ b/subsonic-android/src/github/daneren2005/dsub/util/Util.java @@ -384,7 +384,11 @@ public final class Util { String artist = "artist:\"" + details[details.length - 2] + "\""; String simpleArtist = "artist:\"" + title + "\""; title = "album:\"" + title + "\""; - name = "(" + artist + " AND " + title + ")" + " OR " + simpleArtist; + if(details[details.length - 1].equals(details[details.length - 2])) { + name = title; + } else { + name = "(" + artist + " AND " + title + ")" + " OR " + simpleArtist; + } } else { name = "artist:\"" + title + "\""; } -- cgit v1.2.3