aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2014-01-21 15:49:57 -0800
committerScott Jackson <daneren2005@gmail.com>2014-01-21 15:49:57 -0800
commita0ea69627b36abc28f5c75bf7c5651fbd2be7d98 (patch)
treef37a5fa44ae2a19d672a50586eb12ab76e3f6570 /src
parentb270204acd661067f406e1afe8b3822fb7f45405 (diff)
downloaddsub-a0ea69627b36abc28f5c75bf7c5651fbd2be7d98.tar.gz
dsub-a0ea69627b36abc28f5c75bf7c5651fbd2be7d98.tar.bz2
dsub-a0ea69627b36abc28f5c75bf7c5651fbd2be7d98.zip
When pressing previous on first song with repeat == all, go back to end
Diffstat (limited to 'src')
-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);
}
}