aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2012-12-28 20:40:58 -0800
committerScott Jackson <daneren2005@gmail.com>2012-12-28 20:40:58 -0800
commitfbe74414d7d5d1d5ab2bb8db714464483727cee5 (patch)
tree831c9df8f7e19e710dd1b0dbe9659c35bc48cee6
parent2ad41824e560c596aa7dcf6df556230ed0d12e0d (diff)
downloaddsub-fbe74414d7d5d1d5ab2bb8db714464483727cee5.tar.gz
dsub-fbe74414d7d5d1d5ab2bb8db714464483727cee5.tar.bz2
dsub-fbe74414d7d5d1d5ab2bb8db714464483727cee5.zip
Fix exiting -> starting -> playing a file which was previously streamed not working
-rw-r--r--subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java3
1 files changed, 2 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 0fd2f9ac..5325ee74 100644
--- a/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java
+++ b/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java
@@ -202,6 +202,7 @@ public class DownloadServiceImpl extends Service implements DownloadService {
@Override
public void onDestroy() {
super.onDestroy();
+ currentPlaying.setPlaying(false);
if(sleepTimer != null){
sleepTimer.cancel();
sleepTimer.purge();
@@ -1127,7 +1128,7 @@ public class DownloadServiceImpl extends Service implements DownloadService {
long byteCount = Math.max(100000, bitRate * 1024 / 8 * BUFFER_LENGTH_SECONDS);
// Find out how large the file should grow before resuming playback.
- expectedFileSize = partialFile.length() + byteCount;
+ expectedFileSize = (position * bitRate * 1024) + byteCount;
}
@Override