diff options
author | daneren2005 <daneren2005@gmail.com> | 2013-04-05 15:03:32 -0700 |
---|---|---|
committer | daneren2005 <daneren2005@gmail.com> | 2013-04-05 15:03:32 -0700 |
commit | 7389b1fa486e173ed73a0c3071dfa198460c5e46 (patch) | |
tree | 0a63cc772a01bec13a4fbab7a40aa7a4f1b3a88b /subsonic-android/src/github/daneren2005 | |
parent | 35b227ff8098fd13d4cdb7877118fc7a49925d07 (diff) | |
download | dsub-7389b1fa486e173ed73a0c3071dfa198460c5e46.tar.gz dsub-7389b1fa486e173ed73a0c3071dfa198460c5e46.tar.bz2 dsub-7389b1fa486e173ed73a0c3071dfa198460c5e46.zip |
Make sure to have only one next playing task going at a time
Diffstat (limited to 'subsonic-android/src/github/daneren2005')
-rw-r--r-- | subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java b/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java index 17b22e3e..f94d045d 100644 --- a/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java +++ b/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java @@ -537,16 +537,16 @@ public class DownloadServiceImpl extends Service implements DownloadService { } nextSetup = false; + if(nextPlayingTask != null) { + nextPlayingTask.cancel(); + nextPlayingTask = null; + } if(index < size() && index != -1) { nextPlaying = downloadList.get(index); nextPlayingTask = new CheckCompletionTask(nextPlaying); nextPlayingTask.start(); } else { nextPlaying = null; - if(nextPlayingTask != null) { - nextPlayingTask.cancel(); - } - nextPlayingTask = null; setNextPlayerState(IDLE); } } |