downloader

package
v0.0.0-...-acc4922 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 31, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLangMap

func GetLangMap(code string) string

GetLangMap ...

func Hash

func Hash(path string) (uint64, error)

Hash generates an OSDB hash for a file.

func HashFile

func HashFile(file *os.File) (hash uint64, err error)

HashFile generates an OSDB hash for an *os.File.

Types

type Query

type Query struct {
	ListArgs  []interface{}
	Items     []*SubInfo
	Hash      uint64
	UserAgent string
	Token     string
	File      string
}

Query ..

func NewDL

func NewDL(dir, filename string) *Query

NewDL ...

func (*Query) CleanListArgs

func (q *Query) CleanListArgs() *Query

CleanListArgs ..

func (*Query) Connect

func (q *Query) Connect() error

Connect : Initiate connection to OpenSubtitles.org to get a valid token.

func (*Query) Get

func (q *Query) Get(url, destFile string) (err error)

Get ...

func (*Query) Search

func (q *Query) Search() (items []*SubInfo, err error)

Search ...

type SubInfo

type SubInfo struct {
	SubFromTrusted   string
	IDMovie          string
	SubDownloadLink  string
	MovieReleaseName string
	MatchedBy        string
	SubFileName      string
	LanguageName     string
	SubLanguageID    string
	IDSubtitleFile   string
	MovieHash        string
	SubFormat        string
	MovieKind        string
	SubHD            string
	UserRank         string
	SubAddDate       string
	SubDownloadsCnt  string
	IDMovieImdb      string
	UserNickName     string
}

SubInfo ...

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL