aboutsummaryrefslogtreecommitdiff
path: root/subsonic-android/src/github
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2012-12-09 13:25:04 -0800
committerScott Jackson <daneren2005@gmail.com>2012-12-09 13:25:04 -0800
commit0827811f26c2d94e36e7586a8f276300069f350e (patch)
treefd2190f7aae8ce574bf61e94cae6e03be36fb052 /subsonic-android/src/github
parentd77cb1432678ad6f978b490e3d973f8bdada9e20 (diff)
downloaddsub-0827811f26c2d94e36e7586a8f276300069f350e.tar.gz
dsub-0827811f26c2d94e36e7586a8f276300069f350e.tar.bz2
dsub-0827811f26c2d94e36e7586a8f276300069f350e.zip
Make sure only 1 position caching is running at a time
Diffstat (limited to 'subsonic-android/src/github')
-rw-r--r--subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java3
1 files changed, 1 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 929c22c7..08a218ec 100644
--- a/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java
+++ b/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java
@@ -745,7 +745,7 @@ public class DownloadServiceImpl extends Service implements DownloadService {
scrobbler.scrobble(this, currentPlaying, true);
}
- if(playerState == STARTED) {
+ if(playerState == STARTED && (executorService == null || executorService.isShutdown())) {
Runnable runnable = new Runnable() {
@Override
public void run() {
@@ -846,7 +846,6 @@ public class DownloadServiceImpl extends Service implements DownloadService {
// If file is not completely downloaded, restart the playback from the current position.
int pos = mediaPlayer.getCurrentPosition();
- Log.d(TAG, pos + " of " + cachedPosition);
if(pos == 0) {
Log.w(TAG, "Using cached current position");
pos = cachedPosition;