Documentation
¶
Overview ¶
Package source provides interfaces and types for media file scanning and processing. It handles the discovery and analysis of media files (movies and TV shows) within directory structures, preparing them for renaming operations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Node ¶
type Node struct {
Entry fs.DirEntry
Error error
Info parser.Info
Path string
Response provider.Response
}
Node represents a single file or directory rename operation. It contains the original path, the file info and metadata retrieved from providers.
type Options ¶
type Options struct {
ExcludeGlob string // A glob pattern to exclude files or directories
// TODO: add setting to prefer file name preference over parent directories when finding a match
Recursive bool // Whether to scan directories recursively
MinDepth int // Minimum directory depth to process
MaxDepth int // Maximum directory depth to process
// TODO: might be an options just for renaming and not sourcing
SkipDirectories bool // Whether to skip processing directories themselves
}
Options configures the behavior of source scanning operations.
type Source ¶
type Source interface {
// Scan processes the given path using the provided metadata providers and options,
// returning a list of nodes that represent potential rename operations.
Scan(string, []provider.Interface, Options) ([]Node, error)
}
Source defines the interface for media source scanners. Implementations of this interface can scan directory structures to identify media files and generate rename operations based on metadata providers.