(value: &str)
| 372 | } |
| 373 | |
| 374 | fn is_video_source(value: &str) -> bool { |
| 375 | if is_url(value) { |
| 376 | return true; |
| 377 | } |
| 378 | let ext = Path::new(value) |
| 379 | .extension() |
| 380 | .and_then(|value| value.to_str()) |
| 381 | .unwrap_or("") |
| 382 | .to_ascii_lowercase(); |
| 383 | matches!( |
| 384 | ext.as_str(), |
| 385 | "mp4" | "m4v" | "mov" | "qt" | "avi" | "mkv" | "webm" | "mpg" | "mpeg" | "3gp" | "3g2" |
| 386 | ) |
| 387 | } |
| 388 | |
| 389 | fn normalize_mirror(value: Option<&str>) -> Result<String, AppError> { |
| 390 | let normalized = value.unwrap_or("auto").trim().to_ascii_lowercase(); |