aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2014-01-30 14:57:24 -0800
committerScott Jackson <daneren2005@gmail.com>2014-01-30 14:57:24 -0800
commit1c38860b00a06e73ff36db951d9d7ddbc7a13d78 (patch)
tree74393c81b55c2e77993f91b0bf2075565718a994 /src
parent9f75a03908bd87705a5ff314349c45eb08354281 (diff)
downloaddsub-1c38860b00a06e73ff36db951d9d7ddbc7a13d78.tar.gz
dsub-1c38860b00a06e73ff36db951d9d7ddbc7a13d78.tar.bz2
dsub-1c38860b00a06e73ff36db951d9d7ddbc7a13d78.zip
Fix shuffle creating bogus copies of now playing entry
Diffstat (limited to 'src')
-rw-r--r--src/github/daneren2005/dsub/service/DownloadServiceImpl.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/github/daneren2005/dsub/service/DownloadServiceImpl.java b/src/github/daneren2005/dsub/service/DownloadServiceImpl.java
index e1ea56ef..cba71f8c 100644
--- a/src/github/daneren2005/dsub/service/DownloadServiceImpl.java
+++ b/src/github/daneren2005/dsub/service/DownloadServiceImpl.java
@@ -410,11 +410,12 @@ public class DownloadServiceImpl extends Service implements DownloadService {
@Override
public synchronized void shuffle() {
Collections.shuffle(downloadList);
+ currentPlayingIndex = downloadList.indexOf(currentPlaying);
if (currentPlaying != null) {
downloadList.remove(getCurrentPlayingIndex());
downloadList.add(0, currentPlaying);
+ currentPlayingIndex = 0;
}
- currentPlayingIndex = downloadList.indexOf(currentPlaying);
revision++;
lifecycleSupport.serializeDownloadQueue();
updateJukeboxPlaylist();