Merge branch 'develop' into fix/store-api-version

This commit is contained in:
Nite 2020-10-20 11:52:08 +02:00 committed by GitHub
commit bd5440bb96
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 1 deletions

View File

@ -361,7 +361,16 @@ public class MediaPlayerControllerImpl implements MediaPlayerController
public synchronized void clear(boolean serialize)
{
MediaPlayerService mediaPlayerService = MediaPlayerService.getRunningInstance();
if (mediaPlayerService != null) mediaPlayerService.clear(serialize);
if (mediaPlayerService != null) {
mediaPlayerService.clear(serialize);
} else {
// If no MediaPlayerService is available, just empty the playlist
downloader.clear();
if (serialize) {
downloadQueueSerializer.serializeDownloadQueue(downloader.downloadList,
downloader.getCurrentPlayingIndex(), getPlayerPosition());
}
}
jukeboxMediaPlayer.getValue().updatePlaylist();
}