diff options
Diffstat (limited to 'src/github')
-rw-r--r-- | src/github/daneren2005/dsub/service/DownloadServiceImpl.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/github/daneren2005/dsub/service/DownloadServiceImpl.java b/src/github/daneren2005/dsub/service/DownloadServiceImpl.java index cce2796f..79ce52d7 100644 --- a/src/github/daneren2005/dsub/service/DownloadServiceImpl.java +++ b/src/github/daneren2005/dsub/service/DownloadServiceImpl.java @@ -770,6 +770,9 @@ public class DownloadServiceImpl extends Service implements DownloadService { // Swap the media players since nextMediaPlayer is ready to play if(start) { nextMediaPlayer.start(); + } else if(!nextMediaPlayer.isPlaying()) { + Log.w(TAG, "nextSetup lied about it's state!"); + nextMediaPlayer.start(); } else { Log.i(TAG, "nextMediaPlayer already playing"); } @@ -854,6 +857,10 @@ public class DownloadServiceImpl extends Service implements DownloadService { } if (index != -1 && nextPlayingIndex < size()) { if(nextPlaying != null && downloadList.get(nextPlayingIndex) == nextPlaying && nextPlayerState == PlayerState.PREPARED && remoteState == RemoteControlState.LOCAL) { + if(mediaPlayer.isPlaying()) { + mediaPlayer.stop(); + } + mediaPlayer.setOnErrorListener(null); mediaPlayer.setOnCompletionListener(null); mediaPlayer.reset(); playNext(true); |