From 91a9bcb5fb4710793b3a1774dbc7e995e432173a Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Fri, 8 Aug 2014 16:33:53 -0700 Subject: If nextSetup is true, use playNext regardless If nextSetup is true, then the media player has already called setNextMediaPlayer. Since this is already inside of the onCompletion, there is a pretty good chance that the next media player is already playing. In this case we can't risk going into the condition where the current media player will be restarted. --- src/github/daneren2005/dsub/service/DownloadService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/github/daneren2005/dsub/service/DownloadService.java b/src/github/daneren2005/dsub/service/DownloadService.java index c4837260..250dcf37 100644 --- a/src/github/daneren2005/dsub/service/DownloadService.java +++ b/src/github/daneren2005/dsub/service/DownloadService.java @@ -1493,7 +1493,7 @@ public class DownloadService extends Service { int pos = cachedPosition; Log.i(TAG, "Ending position " + pos + " of " + duration); - if (!isPartial || (downloadFile.isWorkDone() && (Math.abs(duration - pos) < 10000))) { + if (!isPartial || (downloadFile.isWorkDone() && (Math.abs(duration - pos) < 10000)) || nextSetup) { playNext(); // Finished loading, delete when list is cleared -- cgit v1.2.3