aboutsummaryrefslogtreecommitdiff
path: root/app/src
diff options
context:
space:
mode:
Diffstat (limited to 'app/src')
-rw-r--r--app/src/main/java/github/daneren2005/dsub/service/DownloadService.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/src/main/java/github/daneren2005/dsub/service/DownloadService.java b/app/src/main/java/github/daneren2005/dsub/service/DownloadService.java
index bfc9c5d6..40538eae 100644
--- a/app/src/main/java/github/daneren2005/dsub/service/DownloadService.java
+++ b/app/src/main/java/github/daneren2005/dsub/service/DownloadService.java
@@ -477,6 +477,10 @@ public class DownloadService extends Service {
List<DownloadFile> playlist = new ArrayList<>();
if(currentPlaying != null) {
int index = downloadList.indexOf(currentPlaying);
+ if(index == -1) {
+ index = 0;
+ }
+
int size = size();
int end = index + REMOTE_PLAYLIST_TOTAL;
for(int i = index; i < size && i < end; i++) {