mirror of
https://github.com/ultrasonic/ultrasonic
synced 2025-02-07 15:28:40 +01:00
Fixed clearing the playlist when MediaPlayerService isn't running
This commit is contained in:
parent
356af198e0
commit
9eeff3fabc
@ -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();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user