aboutsummaryrefslogtreecommitdiff
path: root/subsonic-android
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2013-01-08 17:27:24 -0800
committerScott Jackson <daneren2005@gmail.com>2013-01-08 17:27:24 -0800
commit2554e7d93e9f182c8c7e89bfc66efb16f462885a (patch)
tree05094015afc4b4a3d448294bc6834bca4344ee2e /subsonic-android
parente74bc4ac24266250eee67249057b401646ddfb4f (diff)
downloaddsub-2554e7d93e9f182c8c7e89bfc66efb16f462885a.tar.gz
dsub-2554e7d93e9f182c8c7e89bfc66efb16f462885a.tar.bz2
dsub-2554e7d93e9f182c8c7e89bfc66efb16f462885a.zip
Fix onError trying to playback from the wrong position
Diffstat (limited to 'subsonic-android')
-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 68ae7a2f..93e10c69 100644
--- a/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java
+++ b/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java
@@ -907,9 +907,10 @@ public class DownloadServiceImpl extends Service implements DownloadService {
mediaPlayer.setOnErrorListener(new MediaPlayer.OnErrorListener() {
public boolean onError(MediaPlayer mediaPlayer, int what, int extra) {
Log.w(TAG, "Error on playing file " + "(" + what + ", " + extra + "): " + downloadFile);
+ int pos = cachedPosition;
reset();
downloadFile.setPlaying(false);
- doPlay(downloadFile, cachedPosition, true);
+ doPlay(downloadFile, pos, true);
downloadFile.setPlaying(true);
return true;
}