aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordaneren2005 <daneren2005@gmail.com>2014-06-23 14:53:07 -0700
committerdaneren2005 <daneren2005@gmail.com>2014-06-23 14:53:07 -0700
commitbcf28e65750ab6355a40fed31f4d296f5daad48f (patch)
tree2189324ea149d7e464767dcda2a9eeab2f870f07
parent17edb005b613d0f9bf58489014254909080689f1 (diff)
downloaddsub-bcf28e65750ab6355a40fed31f4d296f5daad48f.tar.gz
dsub-bcf28e65750ab6355a40fed31f4d296f5daad48f.tar.bz2
dsub-bcf28e65750ab6355a40fed31f4d296f5daad48f.zip
#305 Restrict podcasts episodes options
-rw-r--r--src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java b/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java
index bd1d98dc..ab739b7b 100644
--- a/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java
+++ b/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java
@@ -42,6 +42,7 @@ import github.daneren2005.dsub.util.Constants;
import github.daneren2005.dsub.util.LoadingTask;
import github.daneren2005.dsub.util.Pair;
import github.daneren2005.dsub.util.TabBackgroundTask;
+import github.daneren2005.dsub.util.UserUtil;
import github.daneren2005.dsub.util.Util;
import github.daneren2005.dsub.view.AlbumListAdapter;
import java.util.ArrayList;
@@ -239,6 +240,10 @@ public class SelectDirectoryFragment extends SubsonicFragment implements Adapter
}
else {
menuInflater.inflate(R.menu.select_podcast_episode, menu);
+
+ if(!UserUtil.canPodcast()) {
+ menu.removeItem(R.id.menu_download_all);
+ }
}
}
}
@@ -330,9 +335,14 @@ public class SelectDirectoryFragment extends SubsonicFragment implements Adapter
menu.removeItem(R.id.album_menu_show_artist);
}
if(podcastId != null && !Util.isOffline(context)) {
- String status = ((PodcastEpisode)entry).getStatus();
- if("completed".equals(status)) {
+ if(UserUtil.canPodcast()) {
+ String status = ((PodcastEpisode)entry).getStatus();
+ if("completed".equals(status)) {
+ menu.removeItem(R.id.song_menu_server_download);
+ }
+ } else {
menu.removeItem(R.id.song_menu_server_download);
+ menu.removeItem(R.id.song_menu_server_delete);
}
}