aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2013-01-02 21:18:44 -0800
committerScott Jackson <daneren2005@gmail.com>2013-01-02 21:18:44 -0800
commit581bc03c3148a444397bf4e1136c5f7a42a04666 (patch)
treeb5f79d0c00fa0f9fd70130b97d89e0031d0f68a9
parente1b3644d2d50b874be66037281586f568754ec9d (diff)
downloaddsub-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.java4
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();
}
}
}