fix: count pt-BR as pt-PT in subtitle status
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
77e5177e24
commit
2a71e6fb56
@@ -157,6 +157,16 @@ pub fn rank<'a>(
|
||||
ranked
|
||||
}
|
||||
|
||||
/// Whether a subtitle in `have` settles a want for `wanted` (§15: pt-PT
|
||||
/// preferred, pt-BR always fine). An unverified Portuguese embedded track
|
||||
/// counts too: it satisfies viewing even when no signal resolved the
|
||||
/// flavour. The daemon's gap loop and the API's `missing` list both read
|
||||
/// this, so they cannot disagree about what is satisfied.
|
||||
#[must_use]
|
||||
pub fn satisfies(wanted: &str, have: &str) -> bool {
|
||||
have == wanted || (wanted == "pt-PT" && matches!(have, "pt-BR" | "por-unverified"))
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
Reference in New Issue
Block a user