Fix miniplayer sometimes showing old media file
Happens when pressing play on another episode without pausing the previous one.
This commit is contained in:
parent
35259f5543
commit
7bacb85367
|
@ -59,6 +59,7 @@ public abstract class PlaybackController {
|
||||||
private boolean released = false;
|
private boolean released = false;
|
||||||
private boolean initialized = false;
|
private boolean initialized = false;
|
||||||
private boolean eventsRegistered = false;
|
private boolean eventsRegistered = false;
|
||||||
|
private long loadedFeedMedia = -1;
|
||||||
|
|
||||||
private Disposable mediaLoader;
|
private Disposable mediaLoader;
|
||||||
|
|
||||||
|
@ -380,7 +381,8 @@ public abstract class PlaybackController {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void checkMediaInfoLoaded() {
|
private void checkMediaInfoLoaded() {
|
||||||
if (!mediaInfoLoaded) {
|
if (!mediaInfoLoaded || loadedFeedMedia != PlaybackPreferences.getCurrentlyPlayingFeedMediaId()) {
|
||||||
|
loadedFeedMedia = PlaybackPreferences.getCurrentlyPlayingFeedMediaId();
|
||||||
loadMediaInfo();
|
loadMediaInfo();
|
||||||
}
|
}
|
||||||
mediaInfoLoaded = true;
|
mediaInfoLoaded = true;
|
||||||
|
|
Loading…
Reference in New Issue