mirror of
https://gitlab.com/ultrasonic/ultrasonic.git
synced 2025-04-24 04:40:56 +03:00
Merge pull request #336 from nitehu/fix/clear_playlist
Fixed clearing the playlist when MediaPlayerService isn't running
This commit is contained in:
commit
9341fd3df3
@ -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