fix: add whole queue to song list

This commit is contained in:
Matyáš Caras 2024-05-28 19:03:59 +02:00
parent 773cf12b97
commit 2ef04267d7
Signed by: hernik
GPG key ID: 2A3175F98820C5C6

View file

@ -40,9 +40,8 @@ class AudioPlayerService {
/// Currently playing song
///
/// Null if no song is loaded
Song? get song => _player.currentIndex == null || _player.currentIndex == -1
? null
: _songList[_player.currentIndex!];
Song? get song =>
_player.currentIndex == null ? null : _songList[_player.currentIndex!];
final _queue = ConcatenatingAudioSource(
children: [],
@ -126,6 +125,7 @@ class AudioPlayerService {
await _queue.clear();
_songList
..clear()
..addAll(queuePast)
..addAll(queueNext);
final q = List<AudioSource>.generate(