From fbe74414d7d5d1d5ab2bb8db714464483727cee5 Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Fri, 28 Dec 2012 20:40:58 -0800 Subject: Fix exiting -> starting -> playing a file which was previously streamed not working --- .../src/github/daneren2005/dsub/service/DownloadServiceImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3