aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2013-12-26 06:11:05 -0800
committerScott Jackson <daneren2005@gmail.com>2013-12-26 06:11:05 -0800
commitb0b42634992bd0d33c626f227aa2131bd577c1ca (patch)
tree675b6888fcbf5c1e3f4a4c6d26c67482e4f2f99b /src
parentc100836146116aa2f8181901e071b7230de00d23 (diff)
downloaddsub-b0b42634992bd0d33c626f227aa2131bd577c1ca.tar.gz
dsub-b0b42634992bd0d33c626f227aa2131bd577c1ca.tar.bz2
dsub-b0b42634992bd0d33c626f227aa2131bd577c1ca.zip
#205 Add Show Artist to albums in album lists/search
Diffstat (limited to 'src')
-rw-r--r--src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java4
-rw-r--r--src/github/daneren2005/dsub/fragments/SubsonicFragment.java13
2 files changed, 17 insertions, 0 deletions
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;