diff options
-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(); } } } |