aboutsummaryrefslogtreecommitdiff
path: root/subsonic-android/src
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2013-04-12 18:32:28 -0700
committerScott Jackson <daneren2005@gmail.com>2013-04-12 18:32:28 -0700
commitfd391fb6c4ba57b8baf62414edc18ffd508cfb2a (patch)
tree7f47e3a18c168d36d78bdad4ca0b37db416175a9 /subsonic-android/src
parent65fad72f9e51880767e607ff8f9e0d42fdfde2f4 (diff)
downloaddsub-fd391fb6c4ba57b8baf62414edc18ffd508cfb2a.tar.gz
dsub-fd391fb6c4ba57b8baf62414edc18ffd508cfb2a.tar.bz2
dsub-fd391fb6c4ba57b8baf62414edc18ffd508cfb2a.zip
Stop positionCache immediately on setPlayerStateCompleted
Diffstat (limited to 'subsonic-android/src')
-rw-r--r--subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java b/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java
index 124d0ffe..e04f2cac 100644
--- a/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java
+++ b/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java
@@ -901,9 +901,13 @@ public class DownloadServiceImpl extends Service implements DownloadService {
}
}
- private synchronized void setPlayerStateCompleted() {
+ private void setPlayerStateCompleted() {
Log.i(TAG, this.playerState.name() + " -> " + PlayerState.COMPLETED + " (" + currentPlaying + ")");
this.playerState = PlayerState.COMPLETED;
+ if(positionCache != null) {
+ positionCache.stop();
+ positionCache = null;
+ }
scrobbler.scrobble(this, currentPlaying, true);
}