aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/src/main/java/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java2
-rw-r--r--app/src/main/java/github/daneren2005/dsub/fragments/SubsonicFragment.java18
2 files changed, 15 insertions, 5 deletions
diff --git a/app/src/main/java/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java b/app/src/main/java/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java
index abd1c6aa..2db10c2e 100644
--- a/app/src/main/java/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java
+++ b/app/src/main/java/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java
@@ -858,7 +858,7 @@ public class SelectDirectoryFragment extends SubsonicFragment implements Section
RecursiveLoader onValid = new RecursiveLoader(context) {
@Override
protected Boolean doInBackground() throws Throwable {
- getSongsRecursively(entries, songs);
+ getSongsRecursively(entries, true);
getDownloadService().downloadBackground(songs, save);
return null;
}
diff --git a/app/src/main/java/github/daneren2005/dsub/fragments/SubsonicFragment.java b/app/src/main/java/github/daneren2005/dsub/fragments/SubsonicFragment.java
index 8a0752be..8672f534 100644
--- a/app/src/main/java/github/daneren2005/dsub/fragments/SubsonicFragment.java
+++ b/app/src/main/java/github/daneren2005/dsub/fragments/SubsonicFragment.java
@@ -1943,7 +1943,7 @@ public class SubsonicFragment extends Fragment implements SwipeRefreshLayout.OnR
new RecursiveLoader(context) {
@Override
protected Boolean doInBackground() throws Throwable {
- getSongsRecursively(entries, songs);
+ getSongsRecursively(entries, true);
getDownloadService().downloadBackground(songs, save);
return null;
}
@@ -2018,14 +2018,24 @@ public class SubsonicFragment extends Fragment implements SwipeRefreshLayout.OnR
}
protected void getSongsRecursively(List<Entry> entry) throws Exception {
- getSongsRecursively(entry, songs);
+ getSongsRecursively(entry, false);
+ }
+ protected void getSongsRecursively(List<Entry> entry, boolean allowVideo) throws Exception {
+ getSongsRecursively(entry, songs, allowVideo);
}
protected void getSongsRecursively(List<Entry> entry, List<Entry> songs) throws Exception {
+ getSongsRecursively(entry, songs, false);
+ }
+ protected void getSongsRecursively(List<Entry> entry, List<Entry> songs, boolean allowVideo) throws Exception {
MusicDirectory dir = new MusicDirectory();
dir.addChildren(entry);
- getSongsRecursively(dir, songs);
+ getSongsRecursively(dir, songs, allowVideo);
}
+
protected void getSongsRecursively(MusicDirectory parent, List<Entry> songs) throws Exception {
+ getSongsRecursively(parent, songs, false);
+ }
+ protected void getSongsRecursively(MusicDirectory parent, List<Entry> songs, boolean allowVideo) throws Exception {
if (songs.size() > MAX_SONGS) {
return;
}
@@ -2045,7 +2055,7 @@ public class SubsonicFragment extends Fragment implements SwipeRefreshLayout.OnR
}
for (Entry song : parent.getChildren(false, true)) {
- if (!song.isVideo() && song.getRating() != 1) {
+ if ((!song.isVideo() || allowVideo) && song.getRating() != 1) {
songs.add(song);
}
}