diff options
author | Scott Jackson <daneren2005@gmail.com> | 2014-02-04 14:51:46 -0800 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2014-02-04 14:51:46 -0800 |
commit | 5168bdc1bb49ddf53f31a62978d634f1fbf9e89d (patch) | |
tree | ee40ff621a90d599315564c7b451626ac194cf76 /src/github/daneren2005 | |
parent | 5310034d29d1c84fec8928058328758c259a8035 (diff) | |
download | dsub-5168bdc1bb49ddf53f31a62978d634f1fbf9e89d.tar.gz dsub-5168bdc1bb49ddf53f31a62978d634f1fbf9e89d.tar.bz2 dsub-5168bdc1bb49ddf53f31a62978d634f1fbf9e89d.zip |
Possible fix for next song not playing
Diffstat (limited to 'src/github/daneren2005')
-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); |