Merge branch 'develop' into fix/equalizer_visualizer_init

This commit is contained in:
Nite 2020-10-20 11:59:37 +02:00 committed by GitHub
commit 5c81097df8
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) public synchronized void clear(boolean serialize)
{ {
MediaPlayerService mediaPlayerService = MediaPlayerService.getRunningInstance(); 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(); jukeboxMediaPlayer.getValue().updatePlaylist();
} }