Documentation
¶
Overview ¶
Package identify scans a directory of video files, matches each filename against previously scraped FSS scene metadata, and writes Kodi-style .nfo sidecar files for the matches. It is the engine behind `fss identify`.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindVideos ¶
FindVideos recursively lists all video files under dir.
func WriteReport ¶
WriteReport writes an fss-report.txt listing unmatched and skipped files.
Types ¶
type Options ¶
type Options struct {
Apply bool
Force bool
NoReport bool
// Poster downloads each matched scene's thumbnail to a `-poster` file
// beside the video and points the NFO at it. Off by default: it is a
// network fetch per scene against the same hosts a scrape rate-limits.
//
// Without it, a scene's thumbnail stays a remote URL — and scraped CDN
// URLs are frequently signed and short-lived, so the link is often dead
// by the time a media manager follows it.
Poster bool
// PosterAllowPrivate permits poster URLs resolving to private or loopback
// addresses, for locally-hosted media. See mediafetch.ValidateURL.
PosterAllowPrivate bool
}
Options controls the identify run behaviour.
type Result ¶
type Result struct {
VideoPath string
NFOPath string
Confidence match.MatchConfidence
Scene *match.MergedScene
Skipped bool
SkipReason string
// PosterPath is the downloaded poster file, set only with Options.Poster.
PosterPath string
// PosterError records why a poster could not be saved. The NFO is still
// written — a missing poster does not fail the identification.
PosterError error
}
Result holds the outcome of matching a single video file against the scene index.
func Run ¶
func Run(videos []string, idx *match.SceneIndex, opts Options) []Result
Run matches each video against the scene index and optionally writes NFO sidecar files. It is RunContext with a background context.
func RunContext ¶
RunContext is Run with cancellation, which Options.Poster needs since it performs network fetches.