Fix miniplayer sometimes showing old media file

Happens when pressing play on another episode without pausing the
previous one.
This commit is contained in:
ByteHamster 2021-05-01 11:00:28 +02:00
parent 35259f5543
commit 7bacb85367
1 changed files with 3 additions and 1 deletions

View File

@ -59,6 +59,7 @@ public abstract class PlaybackController {
private boolean released = false;
private boolean initialized = false;
private boolean eventsRegistered = false;
private long loadedFeedMedia = -1;
private Disposable mediaLoader;
@ -380,7 +381,8 @@ public abstract class PlaybackController {
}
private void checkMediaInfoLoaded() {
if (!mediaInfoLoaded) {
if (!mediaInfoLoaded || loadedFeedMedia != PlaybackPreferences.getCurrentlyPlayingFeedMediaId()) {
loadedFeedMedia = PlaybackPreferences.getCurrentlyPlayingFeedMediaId();
loadMediaInfo();
}
mediaInfoLoaded = true;