Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Opener ¶
type Opener interface {
OpenFile(ctx context.Context, name string, flag int, perm os.FileMode) (afero.File, error)
}
Opener abstracts *nzbfilesystem.NzbFilesystem.OpenFile for testability. nzbfilesystem.NzbFilesystem satisfies this interface structurally.
type ProbeResult ¶
ProbeResult is the outcome of Probe.
func Probe ¶
Probe opens path through opener, reads up to the first 512 bytes with read-ahead capped to one backing article, and classifies the result. Definitive failures (ContentInvalid, ContentSegmentMissing) mean the content is confirmed bad; ContentProbeError means the check itself failed and must not be treated as a content failure.
type Result ¶
type Result int
Result classifies the outcome of a content-signature probe.
const ( // ContentValid means a recognized video/audio container signature was found. ContentValid Result = iota // ContentInvalid means bytes were read but no supported container // signature was found — a definitive failure. ContentInvalid // ContentSegmentMissing means the head article required to read the // file's first bytes is confirmed missing — a definitive failure. ContentSegmentMissing // ContentProbeError means the probe could not complete due to a // transient provider, timeout, or connection error — never definitive. ContentProbeError )
Click to show internal directories.
Click to hide internal directories.