Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var DefaultAPIs = Clients{ SubDB(), OpenSubtitles(), Addic7ed(), }
DefaultAPIs represents the available APIs Is also used as the default
var Languages = Langs{}/* 475 elements not displayed */
Languages is the list of all languages
Functions ¶
Types ¶
type Addic7edAPI ¶
Addic7edAPI is the endpoint for downloading Addic7ed subtitles
func (Addic7edAPI) Download ¶
func (s Addic7edAPI) Download(videoPath string, language Language) (subtitlePath string, err error)
Download downloads the Addic7ed subtitle from a video
func (Addic7edAPI) GetAliases ¶
func (s Addic7edAPI) GetAliases() []string
GetAliases returns aliases to identify this API
func (Addic7edAPI) GetName ¶
func (s Addic7edAPI) GetName() string
GetName returns the name of the api
type ByName ¶
type ByName []Language
ByName implements sort.Interface for []Language based on the Description field.
type Client ¶
type Client interface { Download(videoPath string, language Language) (subtitlePath string, err error) Upload(subtitlePath string, language Language, videoPath string) error GetName() string GetAliases() []string }
Client defines the interface to get subtitles from API
type Clients ¶
type Clients []Client
Clients is a slice of Client
type Langs ¶
type Langs []Language
Langs is the type for a list of languages
func (Langs) GetDescriptions ¶
GetDescriptions give the descriptions of the languages, as a list
func (Langs) GetLanguage ¶
GetLanguage get the language from an id
func (Langs) GetLanguages ¶
GetLanguages gets a list of languages, from a list of ids representing a language
type Language ¶
type Language struct { ID string // ID Alias []string // Available alias (as input for Subify) Description string // Description of the language }
Language defines a recognized language for
type OSDBAPI ¶
OSDBAPI entry point
func (OSDBAPI) GetAliases ¶
GetAliases returns aliases to identify this API