mirror of
https://github.com/esphome/esphome.git
synced 2026-10-05 18:41:32 +00:00
[speaker_source] Reshuffle playlist on repeat all restart (#14773)
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
co-authored by
Copilot Autofix powered by AI
parent
e1334cf57f
commit
9d6f2f71e8
@@ -457,6 +457,9 @@ void SpeakerSourceMediaPlayer::process_control_queue_() {
|
|||||||
if (ps.playlist_index < ps.playlist.size()) {
|
if (ps.playlist_index < ps.playlist.size()) {
|
||||||
this->queue_play_current_(pipeline, ps.playlist_delay_ms);
|
this->queue_play_current_(pipeline, ps.playlist_delay_ms);
|
||||||
} else if (ps.repeat_mode == REPEAT_ALL && !ps.playlist.empty()) {
|
} else if (ps.repeat_mode == REPEAT_ALL && !ps.playlist.empty()) {
|
||||||
|
if (!ps.shuffle_indices.empty()) {
|
||||||
|
this->shuffle_playlist_(pipeline);
|
||||||
|
}
|
||||||
ps.playlist_index = 0;
|
ps.playlist_index = 0;
|
||||||
this->queue_play_current_(pipeline, ps.playlist_delay_ms);
|
this->queue_play_current_(pipeline, ps.playlist_delay_ms);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user