aboutsummaryrefslogtreecommitdiff
path: root/src/github/daneren2005
diff options
context:
space:
mode:
Diffstat (limited to 'src/github/daneren2005')
-rw-r--r--src/github/daneren2005/dsub/service/DownloadServiceImpl.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/github/daneren2005/dsub/service/DownloadServiceImpl.java b/src/github/daneren2005/dsub/service/DownloadServiceImpl.java
index 600f2d52..a50d2fe8 100644
--- a/src/github/daneren2005/dsub/service/DownloadServiceImpl.java
+++ b/src/github/daneren2005/dsub/service/DownloadServiceImpl.java
@@ -811,9 +811,13 @@ public class DownloadServiceImpl extends Service implements DownloadService {
}
// Restart song if played more than five seconds.
- if (getPlayerPosition() > 5000 || index == 0) {
+ if (getPlayerPosition() > 5000 || (index == 0 && getRepeatMode() != RepeatMode.ALL)) {
play(index);
} else {
+ if(index == 0) {
+ index = size();
+ }
+
play(index - 1);
}
}