aboutsummaryrefslogtreecommitdiff
path: root/src/github/daneren2005
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2014-01-31 20:05:25 -0800
committerScott Jackson <daneren2005@gmail.com>2014-01-31 20:05:25 -0800
commit3d7069f195c567adf7535b81088c8793564addd8 (patch)
tree6dabef06b683d46796574ba754c4701c1cd7f0ea /src/github/daneren2005
parentdc8ed2b98d149e2c9e734857032d06e2f16d71bc (diff)
downloaddsub-3d7069f195c567adf7535b81088c8793564addd8.tar.gz
dsub-3d7069f195c567adf7535b81088c8793564addd8.tar.bz2
dsub-3d7069f195c567adf7535b81088c8793564addd8.zip
Fix pressing artist search suggestion with tags
Diffstat (limited to 'src/github/daneren2005')
-rw-r--r--src/github/daneren2005/dsub/activity/QueryReceiverActivity.java4
-rw-r--r--src/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java3
-rw-r--r--src/github/daneren2005/dsub/provider/DSubSearchProvider.java2
3 files changed, 8 insertions, 1 deletions
diff --git a/src/github/daneren2005/dsub/activity/QueryReceiverActivity.java b/src/github/daneren2005/dsub/activity/QueryReceiverActivity.java
index de3c034a..4678bbc5 100644
--- a/src/github/daneren2005/dsub/activity/QueryReceiverActivity.java
+++ b/src/github/daneren2005/dsub/activity/QueryReceiverActivity.java
@@ -65,6 +65,10 @@ 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) {
+ intent.putExtra(Constants.INTENT_EXTRA_NAME_ARTIST, true);
+ albumId = albumId.replace("ar-", "");
+ }
intent.putExtra(Constants.INTENT_EXTRA_NAME_ID, albumId);
if (name != null) {
intent.putExtra(Constants.INTENT_EXTRA_NAME_NAME, name);
diff --git a/src/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java b/src/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java
index a83d203f..5f4b0f6f 100644
--- a/src/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java
+++ b/src/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java
@@ -280,6 +280,9 @@ public class SubsonicFragmentActivity extends SubsonicActivity {
Bundle args = new Bundle();
args.putString(Constants.INTENT_EXTRA_NAME_ID, getIntent().getStringExtra(Constants.INTENT_EXTRA_NAME_ID));
args.putString(Constants.INTENT_EXTRA_NAME_NAME, getIntent().getStringExtra(Constants.INTENT_EXTRA_NAME_NAME));
+ if(getIntent().hasExtra(Constants.INTENT_EXTRA_NAME_ARTIST)) {
+ args.putBoolean(Constants.INTENT_EXTRA_NAME_ARTIST, true);
+ }
fragment.setArguments(args);
replaceFragment(fragment, fragmentID, currentFragment.getSupportTag());
diff --git a/src/github/daneren2005/dsub/provider/DSubSearchProvider.java b/src/github/daneren2005/dsub/provider/DSubSearchProvider.java
index 38cc4f4f..4fd4b218 100644
--- a/src/github/daneren2005/dsub/provider/DSubSearchProvider.java
+++ b/src/github/daneren2005/dsub/provider/DSubSearchProvider.java
@@ -75,7 +75,7 @@ public class DSubSearchProvider extends ContentProvider {
for (Artist artist : searchResult.getArtists()) {
String icon = RESOURCE_PREFIX + R.drawable.ic_action_artist;
- cursor.addRow(new Object[]{artist.getId().hashCode(), artist.getName(), null, artist.getId(), artist.getName(), icon});
+ cursor.addRow(new Object[]{artist.getId().hashCode(), artist.getName(), null, "ar-" + artist.getId(), artist.getName(), icon});
}
for (MusicDirectory.Entry album : searchResult.getAlbums()) {
String icon = RESOURCE_PREFIX + R.drawable.ic_action_album;