diff --git a/src/recording_data/between.rs b/src/recording_data/between.rs index f4d4fd0..e8d1452 100644 --- a/src/recording_data/between.rs +++ b/src/recording_data/between.rs @@ -115,6 +115,42 @@ impl RecordingManager { .await; } Ok(clip) => { + let mut second_start = start.second(); + let mut second_end = end.second(); + + if minute > minute_start { + second_start = 0; + } + + if minute < minute_end { + second_end = 59; + } + + let seconds = second_start..=second_end; + + let second = clip.second; + if !seconds.contains(&second) { + continue; + } + + let mut microsecond_start = start.microsecond(); + let mut microsecond_end = end.microsecond(); + + if second > second_start { + microsecond_start = 0; + } + + if second < second_end { + microsecond_end = 999_999; + } + + let microseconds = microsecond_start..=microsecond_end; + + let microsecond = clip.microsecond; + if !microseconds.contains(µsecond) { + continue; + } + let recording = Recording { year, month,