diff options
-rw-r--r-- | res/menu/select_album_context.xml | 4 | ||||
-rw-r--r-- | res/values/strings.xml | 1 | ||||
-rw-r--r-- | src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java | 4 | ||||
-rw-r--r-- | src/github/daneren2005/dsub/fragments/SubsonicFragment.java | 13 |
4 files changed, 22 insertions, 0 deletions
diff --git a/res/menu/select_album_context.xml b/res/menu/select_album_context.xml index 20ab2031..0679cd54 100644 --- a/res/menu/select_album_context.xml +++ b/res/menu/select_album_context.xml @@ -39,6 +39,10 @@ <item android:id="@+id/album_menu_delete" android:title="@string/common.delete"/> + + <item + android:id="@+id/album_menu_show_artist" + android:title="@string/menu.show_artist"/> <item android:id="@+id/album_menu_star" diff --git a/res/values/strings.xml b/res/values/strings.xml index 677b69cf..f3c14b82 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -80,6 +80,7 @@ <string name="menu.keep_synced">Keep Synced</string>
<string name="menu.stop_sync">Stop syncing</string>
<string name="menu.show_all">Show all media</string>
+ <string name="menu.show_artist">Show Artist</string>
<string name="playlist.label">Playlists</string>
<string name="playlist.update_info">Update Information</string>
diff --git a/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java b/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java index 4ed4123f..d213ecff 100644 --- a/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java +++ b/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java @@ -256,6 +256,10 @@ public class SelectDirectoryFragment extends SubsonicFragment implements Adapter if(!entry.isVideo() && !Util.isOffline(context) && playlistId == null && (podcastId == null || Util.isOffline(context) && podcastId != null)) {
menu.removeItem(R.id.song_menu_remove_playlist);
}
+ // Remove show artists if parent is not set and if not on a album list
+ if((albumListType == null || entry.getParent() == null) && !Util.isOffline(context)) {
+ menu.removeItem(R.id.album_menu_show_artist);
+ }
if(podcastId != null && !Util.isOffline(context)) {
String status = ((PodcastEpisode)entry).getStatus();
if("completed".equals(status)) {
diff --git a/src/github/daneren2005/dsub/fragments/SubsonicFragment.java b/src/github/daneren2005/dsub/fragments/SubsonicFragment.java index ed900b92..224c051b 100644 --- a/src/github/daneren2005/dsub/fragments/SubsonicFragment.java +++ b/src/github/daneren2005/dsub/fragments/SubsonicFragment.java @@ -274,6 +274,9 @@ public class SubsonicFragment extends Fragment { case R.id.album_menu_info:
displaySongInfo(entry);
break;
+ case R.id.album_menu_show_artist:
+ showArtist((MusicDirectory.Entry) selectedItem);
+ break;
case R.id.song_menu_play_now:
getDownloadService().clear();
getDownloadService().download(songs, false, true, true, false);
@@ -1043,6 +1046,16 @@ public class SubsonicFragment extends Fragment { refresh();
}
}
+
+ public void showArtist(MusicDirectory.Entry entry) {
+ SubsonicFragment fragment = new SelectDirectoryFragment();
+ Bundle args = new Bundle();
+ args.putString(Constants.INTENT_EXTRA_NAME_ID, entry.getParent());
+ args.putString(Constants.INTENT_EXTRA_NAME_NAME, entry.getArtist());
+ fragment.setArguments(args);
+
+ replaceFragment(fragment, getRootId(), true);
+ }
public GestureDetector getGestureDetector() {
return gestureScanner;
|