diff options
author | Scott Jackson <daneren2005@gmail.com> | 2014-01-22 21:43:08 -0800 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2014-01-22 21:43:08 -0800 |
commit | 0d3eebaf1940c8fb6e604df6a1da33dcbb5b99e1 (patch) | |
tree | ec3bc59b38da767aa540545ae9225d23a18cb5a5 /src/github | |
parent | e851fcaabb00cf2570de3553fcda6003181d18e6 (diff) | |
download | dsub-0d3eebaf1940c8fb6e604df6a1da33dcbb5b99e1.tar.gz dsub-0d3eebaf1940c8fb6e604df6a1da33dcbb5b99e1.tar.bz2 dsub-0d3eebaf1940c8fb6e604df6a1da33dcbb5b99e1.zip |
Fix a few places where the index wasn't properly updated
Diffstat (limited to 'src/github')
-rw-r--r-- | src/github/daneren2005/dsub/service/DownloadServiceImpl.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/github/daneren2005/dsub/service/DownloadServiceImpl.java b/src/github/daneren2005/dsub/service/DownloadServiceImpl.java index a50d2fe8..e1ea56ef 100644 --- a/src/github/daneren2005/dsub/service/DownloadServiceImpl.java +++ b/src/github/daneren2005/dsub/service/DownloadServiceImpl.java @@ -414,6 +414,7 @@ public class DownloadServiceImpl extends Service implements DownloadService { downloadList.remove(getCurrentPlayingIndex()); downloadList.add(0, currentPlaying); } + currentPlayingIndex = downloadList.indexOf(currentPlaying); revision++; lifecycleSupport.serializeDownloadQueue(); updateJukeboxPlaylist(); @@ -557,6 +558,7 @@ public class DownloadServiceImpl extends Service implements DownloadService { @Override public synchronized void remove(int which) { downloadList.remove(which); + currentPlayingIndex = downloadList.indexOf(currentPlaying); } @Override @@ -570,6 +572,7 @@ public class DownloadServiceImpl extends Service implements DownloadService { setCurrentPlaying(null, false); } downloadList.remove(downloadFile); + currentPlayingIndex = downloadList.indexOf(currentPlaying); backgroundDownloadList.remove(downloadFile); revision++; lifecycleSupport.serializeDownloadQueue(); @@ -1546,6 +1549,7 @@ public class DownloadServiceImpl extends Service implements DownloadService { revision++; } } + currentPlayingIndex = downloadList.indexOf(currentPlaying); if (revisionBefore != revision) { updateJukeboxPlaylist(); |