fix: add whole queue to song list
This commit is contained in:
parent
773cf12b97
commit
2ef04267d7
1 changed files with 3 additions and 3 deletions
|
@ -40,9 +40,8 @@ class AudioPlayerService {
|
||||||
/// Currently playing song
|
/// Currently playing song
|
||||||
///
|
///
|
||||||
/// Null if no song is loaded
|
/// Null if no song is loaded
|
||||||
Song? get song => _player.currentIndex == null || _player.currentIndex == -1
|
Song? get song =>
|
||||||
? null
|
_player.currentIndex == null ? null : _songList[_player.currentIndex!];
|
||||||
: _songList[_player.currentIndex!];
|
|
||||||
|
|
||||||
final _queue = ConcatenatingAudioSource(
|
final _queue = ConcatenatingAudioSource(
|
||||||
children: [],
|
children: [],
|
||||||
|
@ -126,6 +125,7 @@ class AudioPlayerService {
|
||||||
await _queue.clear();
|
await _queue.clear();
|
||||||
_songList
|
_songList
|
||||||
..clear()
|
..clear()
|
||||||
|
..addAll(queuePast)
|
||||||
..addAll(queueNext);
|
..addAll(queueNext);
|
||||||
|
|
||||||
final q = List<AudioSource>.generate(
|
final q = List<AudioSource>.generate(
|
||||||
|
|
Loading…
Reference in a new issue