aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--subsonic-android/src/github/daneren2005/dsub/service/DownloadService.java2
-rw-r--r--subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java8
2 files changed, 10 insertions, 0 deletions
diff --git a/subsonic-android/src/github/daneren2005/dsub/service/DownloadService.java b/subsonic-android/src/github/daneren2005/dsub/service/DownloadService.java
index 556765f2..a2f2868f 100644
--- a/subsonic-android/src/github/daneren2005/dsub/service/DownloadService.java
+++ b/subsonic-android/src/github/daneren2005/dsub/service/DownloadService.java
@@ -64,6 +64,8 @@ public interface DownloadService {
List<DownloadFile> getSongs();
List<DownloadFile> getDownloads();
+
+ List<DownloadFile> getBackgroundDownloads();
int getCurrentPlayingIndex();
diff --git a/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java b/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java
index 7ba54832..09cbb40f 100644
--- a/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java
+++ b/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java
@@ -403,6 +403,7 @@ public class DownloadServiceImpl extends Service implements DownloadService {
setCurrentPlaying(null, false);
}
downloadList.remove(downloadFile);
+ backgroundDownloadList.remove(downloadFile);
revision++;
lifecycleSupport.serializeDownloadQueue();
updateJukeboxPlaylist();
@@ -480,6 +481,13 @@ public class DownloadServiceImpl extends Service implements DownloadService {
temp.addAll(backgroundDownloadList);
return temp;
}
+
+ @Override
+ public synchronized List<DownloadFile> getBackgroundDownloads() {
+ List<DownloadFile> temp = new ArrayList<DownloadFile>();
+ temp.addAll(backgroundDownloadList);
+ return temp;
+ }
/** Plays either the current song (resume) or the first/next one in queue. */
public synchronized void play()