From a0ea69627b36abc28f5c75bf7c5651fbd2be7d98 Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Tue, 21 Jan 2014 15:49:57 -0800 Subject: When pressing previous on first song with repeat == all, go back to end --- src/github/daneren2005/dsub/service/DownloadServiceImpl.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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); } } -- cgit v1.2.3