Fix sometimes stopping at the end of each episode (#6753)
The bug is on this line [#145](f7a13065a9/core/src/main/java/de/danoeh/antennapod/core/storage/DBWriter.java (L145)
) - the call to `PlaybackPreferences.getCurrentlyPlayingFeedMediaId()` returns the episode that was playing and deleted, hence it stops playing the next episode like it is supposed to. Because it's called in a Thread, the next episode already started playing for 1 second or so and then stops
The fix will now save into the preference the correct episode that is playing on the PREPARE stage.
This commit is contained in:
parent
8af06a9f25
commit
7bfb53cc00
|
@ -799,6 +799,10 @@ public class PlaybackService extends MediaBrowserServiceCompat {
|
||||||
updateNotificationAndMediaSession(newInfo.playable);
|
updateNotificationAndMediaSession(newInfo.playable);
|
||||||
break;
|
break;
|
||||||
case PREPARED:
|
case PREPARED:
|
||||||
|
if (mediaPlayer.getPSMPInfo().playable != null) {
|
||||||
|
PlaybackPreferences.writeMediaPlaying(mediaPlayer.getPSMPInfo().playable,
|
||||||
|
mediaPlayer.getPSMPInfo().playerStatus);
|
||||||
|
}
|
||||||
taskManager.startChapterLoader(newInfo.playable);
|
taskManager.startChapterLoader(newInfo.playable);
|
||||||
break;
|
break;
|
||||||
case PAUSED:
|
case PAUSED:
|
||||||
|
|
Loading…
Reference in New Issue