aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordaneren2005 <daneren2005@gmail.com>2014-06-19 15:26:31 -0700
committerdaneren2005 <daneren2005@gmail.com>2014-06-19 15:26:31 -0700
commitd439055026acb4107cefa72d60032c2854978236 (patch)
treed166bd4ae4cd5ef260d7a34e8b3fa2e01ba03aeb /src
parent091c03fc6f911b34ab24f1647a2e759fb65bfa34 (diff)
downloaddsub-d439055026acb4107cefa72d60032c2854978236.tar.gz
dsub-d439055026acb4107cefa72d60032c2854978236.tar.bz2
dsub-d439055026acb4107cefa72d60032c2854978236.zip
Remove "Remove from Playlist" if not owner
Diffstat (limited to 'src')
-rw-r--r--src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java b/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java
index d34b517e..7703d5b2 100644
--- a/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java
+++ b/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java
@@ -68,6 +68,7 @@ public class SelectDirectoryFragment extends SubsonicFragment implements Adapter
String name;
String playlistId;
String playlistName;
+ boolean playlistOwner;
String podcastId;
String podcastName;
String podcastDescription;
@@ -109,6 +110,7 @@ public class SelectDirectoryFragment extends SubsonicFragment implements Adapter
name = args.getString(Constants.INTENT_EXTRA_NAME_NAME);
playlistId = args.getString(Constants.INTENT_EXTRA_NAME_PLAYLIST_ID);
playlistName = args.getString(Constants.INTENT_EXTRA_NAME_PLAYLIST_NAME);
+ playlistOwner = args.getBoolean(Constants.INTENT_EXTRA_NAME_PLAYLIST_OWNER, false);
podcastId = args.getString(Constants.INTENT_EXTRA_NAME_PODCAST_ID);
podcastName = args.getString(Constants.INTENT_EXTRA_NAME_PODCAST_NAME);
podcastDescription = args.getString(Constants.INTENT_EXTRA_NAME_PODCAST_DESCRIPTION);
@@ -222,7 +224,7 @@ public class SelectDirectoryFragment extends SubsonicFragment implements Adapter
else {
menuInflater.inflate(R.menu.select_song, menu);
- if(playlistId == null) {
+ if(playlistId == null || !playlistOwner) {
menu.removeItem(R.id.menu_remove_playlist);
}
}
@@ -323,7 +325,7 @@ public class SelectDirectoryFragment extends SubsonicFragment implements Adapter
}
onCreateContextMenu(menu, view, menuInfo, entry);
- if(!entry.isVideo() && !Util.isOffline(context) && playlistId == null && (podcastId == null || Util.isOffline(context) && podcastId != null)) {
+ if(!entry.isVideo() && !Util.isOffline(context) && (playlistId == null || !playlistOwner) && (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