fix(probe): do not hide prober failures or cover art
ci / web (pull_request) Successful in 6s
ci / rust (pull_request) Successful in 1m30s
e2e / e2e (pull_request) Successful in 1m35s

Review on #59. select_feature skipped every probe error, so a missing
ffprobe or a timeout reported "no video file" for a torrent that has
one; only per-file content failures are skipped now. And an audio file
with embedded artwork reports the cover as a video stream, which made a
soundtrack look importable.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Miguel Palhas
2026-08-22 20:39:25 +01:00
co-authored by Claude Opus 5
parent 3927927466
commit 4e880413ae
7 changed files with 78 additions and 5 deletions
+21
View File
@@ -95,3 +95,24 @@ pub enum Error {
#[error("no video file among the candidates")]
NoCandidates,
}
impl Error {
/// Whether this failure is a fact about one file rather than about the
/// prober.
///
/// Feature selection walks a torrent full of `.nfo`, `.jpg` and `.txt`
/// files, so a file that is not importable media is expected and gets
/// skipped. A missing binary, a timeout or unparseable output is not about
/// the file at all, and swallowing it would report "no video file" for a
/// torrent that has one.
#[must_use]
pub const fn is_about_the_file(&self) -> bool {
matches!(
self,
Self::Rejected { .. }
| Self::NotVideo { .. }
| Self::NoVideoStream { .. }
| Self::NoDuration { .. }
)
}
}