aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/github/daneren2005/dsub/fragments/SubsonicFragment.java13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/github/daneren2005/dsub/fragments/SubsonicFragment.java b/src/github/daneren2005/dsub/fragments/SubsonicFragment.java
index 3c2f1f54..62028666 100644
--- a/src/github/daneren2005/dsub/fragments/SubsonicFragment.java
+++ b/src/github/daneren2005/dsub/fragments/SubsonicFragment.java
@@ -788,7 +788,18 @@ public class SubsonicFragment extends Fragment implements SwipeRefreshLayout.OnR
@Override
protected List<Playlist> doInBackground() throws Throwable {
MusicService musicService = MusicServiceFactory.getMusicService(context);
- return musicService.getPlaylists(false, context, this);
+ List<Playlist> playlists = musicService.getPlaylists(false, context, this);
+
+ // Iterate through and remove all non owned public playlists
+ Iterator<Playlist> it = playlists.iterator();
+ while(it.hasNext()) {
+ Playlist playlist = it.next();
+ if(playlist.getPublic() == true && !UserUtil.getCurrentUsername(context).equals(playlist.getOwner)) {
+ it.remove();
+ }
+ }
+
+ return playlists;
}
@Override