Fix incorrect match arm guard

This commit is contained in:
norepro 2025-11-27 01:27:29 -08:00
parent ca0de9d07e
commit 636a73a27f

View file

@ -1314,13 +1314,16 @@ impl Application for App {
} }
} }
Message::EndOfStream => { Message::EndOfStream => {
let repeat_state = &self.flags.config_state.player_state.repeat;
println!( println!(
"end of stream, repeat={:?}, has_media_repeated={:?}", "end of stream, repeat={:?}, has_media_repeated={:?}",
self.flags.config_state.player_state.repeat, self.has_media_repeated repeat_state, self.has_media_repeated
); );
match self.flags.config_state.player_state.repeat { match repeat_state {
RepeatState::Always | RepeatState::Once if !self.has_media_repeated => { RepeatState::Always | RepeatState::Once
if (*repeat_state == RepeatState::Always || !self.has_media_repeated) =>
{
if let Some(video) = &mut self.video_opt { if let Some(video) = &mut self.video_opt {
self.has_media_repeated = true; self.has_media_repeated = true;
video.restart_stream().expect("restart_stream"); video.restart_stream().expect("restart_stream");