diff options
author | daneren2005 <daneren2005@gmail.com> | 2013-05-20 12:15:57 -0600 |
---|---|---|
committer | daneren2005 <daneren2005@gmail.com> | 2013-05-20 12:15:57 -0600 |
commit | 03c7142708b26f91a65cbd4b6fd6619cf68f2cf8 (patch) | |
tree | 3c1a1146b3f3ba2dbf617de1887c39a54f5a804a | |
parent | 6219116b1b707510ee66b810ea280a0f4c8b59f8 (diff) | |
download | dsub-03c7142708b26f91a65cbd4b6fd6619cf68f2cf8.tar.gz dsub-03c7142708b26f91a65cbd4b6fd6619cf68f2cf8.tar.bz2 dsub-03c7142708b26f91a65cbd4b6fd6619cf68f2cf8.zip |
Don't finish restore until mediaPlayer is setup
-rw-r--r-- | subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java b/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java index fabeba6f..d157b46a 100644 --- a/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java +++ b/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java @@ -322,6 +322,10 @@ public class DownloadServiceImpl extends Service implements DownloadService { public void restore(List<MusicDirectory.Entry> songs, int currentPlayingIndex, int currentPlayingPosition) { download(songs, false, false, false, false); if (currentPlayingIndex != -1) { + while(mediaPlayer == null) { + Util.sleepQuietly(50L); + } + play(currentPlayingIndex, autoPlayStart); if (currentPlaying != null && currentPlaying.isCompleteFileAvailable()) { doPlay(currentPlaying, currentPlayingPosition, autoPlayStart); |