Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App interface {
Provider
http.Handler
Config() Config
FindMedia(...string) (LocalMediaList, error)
DownloadSubtitles(LocalMediaList, set.Interface) (int, error)
}
App is the interface for the top level capabilities of the application. It is an HTTP handler, a provider (for subtitles) and a CLI application. It means App can both be used as a HTTP server and a CLI application.
type Config ¶ added in v0.2.0
type Config interface {
Languages() set.Interface
Impaired() bool
Limit() int
Modified() time.Duration
Dry() bool
Score() int
Delay() time.Duration
Force() bool
Config() string
Logfile() string
Verbose() bool
Strict() bool
Plugins() []Plugin
}
Config is the interface for application configuration
type Downloadable ¶
type Downloadable interface {
Download() (io.ReadCloser, error)
}
Downloadable is an interface for media that can be downloaded from the internet
type Linker ¶
type Linker interface {
Link() string
}
Linker is an object which can be fetched from the internet
type List ¶
type List interface {
Len() int
}
List interface describes all common properties of lists
type LocalMedia ¶
type LocalMedia interface {
Local
Media
ExistingSubtitles() (SubtitleList, error)
SaveSubtitle(Downloadable, language.Tag) (LocalSubtitle, error)
}
LocalMedia is an interface for media found locally on disk
type LocalMediaList ¶
type LocalMediaList interface {
List
Add(LocalMedia)
List() []LocalMedia
FilterModified(time.Duration) LocalMediaList
FilterMissingSubs(set.Interface) (LocalMediaList, error)
}
LocalMediaList is a list of media which can be manipulated
type LocalSubtitle ¶ added in v0.2.0
LocalSubtitle is an subtitle which is stored on disk
type Metadata ¶
type Metadata interface {
String() string
Group() string
Codec() codec.Tag
Quality() quality.Tag
Source() source.Tag
AllTags() []string
}
Metadata is an interface metadata information
type OnlineSubtitle ¶
type OnlineSubtitle interface {
Linker
Downloadable
Subtitle
}
OnlineSubtitle is a subtitle obtained from the internet and can be downloaded and stored on disk
type Plugin ¶ added in v0.2.0
type Plugin interface {
Name() string
Run(LocalSubtitle) error
}
Plugin is an interface for external functionality
type Provider ¶
type Provider interface {
SearchSubtitles(LocalMedia) ([]OnlineSubtitle, error)
ResolveSubtitle(Linker) (Downloadable, error)
}
Provider interfaces with subtitles websites to provide subtitles
type SubtitleList ¶
type SubtitleList interface {
List
Add(...Subtitle)
Best() (Subtitle, float32)
List() []Subtitle
LanguageSet() set.Interface
FilterLanguage(language.Tag) SubtitleList
FilterScore(float32) SubtitleList
HearingImpaired(bool) SubtitleList
}
SubtitleList is a collection of subtitles