Update for rust 1.100

This commit is contained in:
2026-11-12 22:21:58 -06:00
parent eb1de069f3
commit ebdf58448e
7 changed files with 229 additions and 211 deletions
+22 -21
View File
@@ -228,27 +228,28 @@ fn find_stream_index(file: &MediaFile, selector: &Selector) -> Option<usize> {
},
StreamType::Subtitle => match &selector.matcher {
Matcher::Index(index) => (file.streams.subtitle.len() > *index).then_some(*index),
Matcher::Language(language) => {
file.streams
.subtitle
.iter()
.enumerate()
.filter(|(_, c)| c.language() == Some(language.as_str()))
.filter(|(_, c)| {
c.title()
.unwrap_or_default()
.to_ascii_lowercase()
.contains("forced") == needs_forced
})
.filter(|(_, c)| {
c.title()
.unwrap_or_default()
.to_ascii_lowercase()
.contains("sdh") == needs_sdh
})
.map(|(i, _)| i)
.next()
}
Matcher::Language(language) => file
.streams
.subtitle
.iter()
.enumerate()
.filter(|(_, c)| c.language() == Some(language.as_str()))
.filter(|(_, c)| {
c.title()
.unwrap_or_default()
.to_ascii_lowercase()
.contains("forced")
== needs_forced
})
.filter(|(_, c)| {
c.title()
.unwrap_or_default()
.to_ascii_lowercase()
.contains("sdh")
== needs_sdh
})
.map(|(i, _)| i)
.next(),
Matcher::Codec(codec) => file
.streams
.subtitle