diff options
author | Scott Jackson <daneren2005@gmail.com> | 2013-01-02 21:18:44 -0800 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2013-01-02 21:18:44 -0800 |
commit | 581bc03c3148a444397bf4e1136c5f7a42a04666 (patch) | |
tree | b5f79d0c00fa0f9fd70130b97d89e0031d0f68a9 | |
parent | e1b3644d2d50b874be66037281586f568754ec9d (diff) | |
download | dsub-581bc03c3148a444397bf4e1136c5f7a42a04666.tar.gz dsub-581bc03c3148a444397bf4e1136c5f7a42a04666.tar.bz2 dsub-581bc03c3148a444397bf4e1136c5f7a42a04666.zip |
Fix cache position screwing up playback during prepare
-rw-r--r-- | subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java b/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java index c6789ecb..1878f422 100644 --- a/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java +++ b/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java @@ -749,7 +749,7 @@ public class DownloadServiceImpl extends Service implements DownloadService { handler.post(new Runnable() { @Override public void run() { - if(mediaPlayer != null) { + if(mediaPlayer != null && getPlayerState() == STARTED) { try { cachedPosition = mediaPlayer.getCurrentPosition(); } catch(Exception e) { @@ -764,7 +764,7 @@ public class DownloadServiceImpl extends Service implements DownloadService { executorService.scheduleWithFixedDelay(runnable, 200L, 200L, TimeUnit.MILLISECONDS); } else { if(executorService != null && !executorService.isShutdown()) { - executorService.shutdown(); + executorService.shutdownNow(); } } } |