Documentation ¶
Overview ¶
Package importer provides functions for importing movies into the library
Index ¶
- type Context
- func (c *Context) Errorf(message string, arguments ...interface{})
- func (c *Context) FileInfo(filenames <-chan string, files chan<- *library.VideoFile)
- func (c *Context) ImdbIdentifier(shows <-chan library.ShowWithFile, doneSeries chan<- *library.Series, ...)
- func (c *Context) Import(paths []string)
- func (c *Context) OsdbClient() (*osdb.Client, error)
- func (c *Context) OsdbIdentifier(files <-chan *library.VideoFile, shows chan<- library.ShowWithFile, ...)
- func (c *Context) ProcessShows(shows <-chan library.ShowWithFile)
- func (c *Context) SubtitleDownloader(files <-chan library.ShowWithFile, subtitles chan<- *library.Subtitle, ...)
- func (c *Context) WalkPaths(paths []string, filenames chan<- string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct { // Close this channel to stop all import workers Stop chan struct{} Library *library.Library Config *config.Config // Channel for unrecoverable pipeline errors, to be read by a human Errors chan error // Files which have failed to identify correctly during import FilesWithErrors []*library.VideoFile // contains filtered or unexported fields }
Context contains common data for all importers
func NewContext ¶
NewContext initializes a context with the given library and config
func (*Context) ImdbIdentifier ¶
func (c *Context) ImdbIdentifier( shows <-chan library.ShowWithFile, doneSeries chan<- *library.Series, done chan<- library.ShowWithFile, )
ImdbIdentifier fetches data from imdb for the given shows (they must have an ImdbID). For shows which are episodes, it fetches the respective series.
func (*Context) Import ¶
Import imports and processes all shows from the given paths into the library
func (*Context) OsdbClient ¶
OsdbClient returns a logged in Osdb client
func (*Context) OsdbIdentifier ¶
func (c *Context) OsdbIdentifier( files <-chan *library.VideoFile, shows chan<- library.ShowWithFile, done chan<- *library.VideoFile, )
OsdbIdentifier identifies the video files (matching them to shows) using the opensubtitles.org database
func (*Context) ProcessShows ¶
func (c *Context) ProcessShows(shows <-chan library.ShowWithFile)
ProcessShows fetches data for each show from online sources
func (*Context) SubtitleDownloader ¶
func (c *Context) SubtitleDownloader( files <-chan library.ShowWithFile, subtitles chan<- *library.Subtitle, done chan<- library.ShowWithFile, )
SubtitleDownloader downloads subtitles for each file, using information from its associated show.