aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2020-12-29 19:35:07 -0800
committerScott Jackson <daneren2005@gmail.com>2020-12-29 19:35:07 -0800
commit059a4c98b956310b10c9e14c3196ce1ece02420f (patch)
tree39c11873d8608b7dc8b4ce304179fa2661612fcb /app
parentc04e82eeb909638e6fc9a8db63f1cc7b83634114 (diff)
downloaddsub-059a4c98b956310b10c9e14c3196ce1ece02420f.tar.gz
dsub-059a4c98b956310b10c9e14c3196ce1ece02420f.tar.bz2
dsub-059a4c98b956310b10c9e14c3196ce1ece02420f.zip
Fixes #1043 Add a dsub prefix to search id workaround in case other servers try to use ar- or so- prefixes
Diffstat (limited to 'app')
-rw-r--r--app/src/main/java/github/daneren2005/dsub/activity/QueryReceiverActivity.java8
-rw-r--r--app/src/main/java/github/daneren2005/dsub/provider/DSubSearchProvider.java4
2 files changed, 6 insertions, 6 deletions
diff --git a/app/src/main/java/github/daneren2005/dsub/activity/QueryReceiverActivity.java b/app/src/main/java/github/daneren2005/dsub/activity/QueryReceiverActivity.java
index eefb9c56..68f46599 100644
--- a/app/src/main/java/github/daneren2005/dsub/activity/QueryReceiverActivity.java
+++ b/app/src/main/java/github/daneren2005/dsub/activity/QueryReceiverActivity.java
@@ -68,12 +68,12 @@ public class QueryReceiverActivity extends Activity {
Intent intent = new Intent(this, SubsonicFragmentActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP | Intent.FLAG_ACTIVITY_CLEAR_TOP);
intent.putExtra(Constants.INTENT_EXTRA_VIEW_ALBUM, true);
- if(albumId.indexOf("ar-") == 0) {
+ if(albumId.indexOf("dsub-ar-") == 0) {
intent.putExtra(Constants.INTENT_EXTRA_NAME_ARTIST, true);
- albumId = albumId.replace("ar-", "");
- } else if(albumId.indexOf("so-") == 0) {
+ albumId = albumId.replace("dsub-ar-", "");
+ } else if(albumId.indexOf("dsub-so-") == 0) {
intent.putExtra(Constants.INTENT_EXTRA_SEARCH_SONG, name);
- albumId = albumId.replace("so-", "");
+ albumId = albumId.replace("dsub-so-", "");
}
intent.putExtra(Constants.INTENT_EXTRA_NAME_ID, albumId);
if (name != null) {
diff --git a/app/src/main/java/github/daneren2005/dsub/provider/DSubSearchProvider.java b/app/src/main/java/github/daneren2005/dsub/provider/DSubSearchProvider.java
index ba8c80c1..b47cbd28 100644
--- a/app/src/main/java/github/daneren2005/dsub/provider/DSubSearchProvider.java
+++ b/app/src/main/java/github/daneren2005/dsub/provider/DSubSearchProvider.java
@@ -145,7 +145,7 @@ public class DSubSearchProvider extends ContentProvider {
if(obj instanceof Artist) {
Artist artist = (Artist) obj;
String icon = RESOURCE_PREFIX + R.drawable.ic_action_artist;
- cursor.addRow(new Object[]{artist.getId().hashCode(), artist.getName(), null, "ar-" + artist.getId(), artist.getName(), icon});
+ cursor.addRow(new Object[]{artist.getId().hashCode(), artist.getName(), null, "dsub-ar-" + artist.getId(), artist.getName(), icon});
} else {
MusicDirectory.Entry entry = (MusicDirectory.Entry) obj;
@@ -174,7 +174,7 @@ public class DSubSearchProvider extends ContentProvider {
artistDisplay = entry.getArtist();
}
- cursor.addRow(new Object[]{entry.getId().hashCode(), entry.getTitle(), artistDisplay, "so-" + id, entry.getTitle(), icon});
+ cursor.addRow(new Object[]{entry.getId().hashCode(), entry.getTitle(), artistDisplay, "dsub-so-" + id, entry.getTitle(), icon});
}
}
}