file_downloader

package
v0.55.3 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileDownloader

type FileDownloader struct {
	Log              *logrus.Logger
	CacheCenter      *cache_center.CacheCenter
	SubParserHub     *sub_parser_hub.SubParserHub
	MediaInfoDealers *media_info_dealers.Dealers
}

func NewFileDownloader

func NewFileDownloader(cacheCenter *cache_center.CacheCenter, authKey random_auth_key.AuthKey) *FileDownloader

func (*FileDownloader) Get

func (f *FileDownloader) Get(supplierName string, topN int64, videoFileName string,
	fileDownloadUrl string, score int64, offset int64, cacheString ...string) (*supplier.SubInfo, error)

Get supplierName 这个参数一定得是字幕源的名称,通过 s.GetSupplierName() 获取,否则后续的字幕源今日下载量将不能正确统计和判断 xunlei、shooter 使用这个

func (*FileDownloader) GetA4k

func (f *FileDownloader) GetA4k(supplierName string, topN int64, season, eps int,
	videoFileName string, fileDownloadUrl string) (*supplier.SubInfo, error)

GetA4k supplierName 这个参数一定得是字幕源的名称,通过 s.GetSupplierName() 获取,否则后续的字幕源今日下载量将不能正确统计和判断

func (*FileDownloader) GetEx

func (f *FileDownloader) GetEx(supplierName string, browser *rod.Browser, subDownloadPageUrl string, TopN int64, Season, Episode int, downFileFunc func(browser *rod.Browser, subDownloadPageUrl string, TopN int64, Season, Episode int) (*supplier.SubInfo, error)) (*supplier.SubInfo, error)

GetEx supplierName 这个参数一定得是字幕源的名称,通过 s.GetSupplierName() 获取,否则后续的字幕源今日下载量将不能正确统计和判断 zimuku、subhd 使用这个

func (*FileDownloader) GetName

func (f *FileDownloader) GetName() string

func (*FileDownloader) GetSubtitleBest added in v0.49.0

func (f *FileDownloader) GetSubtitleBest(supplierName string, topN int64, season, eps int,
	title, ext, subSha256, fileDownloadUrl string) (*supplier.SubInfo, error)

GetSubtitleBest supplierName 这个参数一定得是字幕源的名称,通过 s.GetSupplierName() 获取,否则后续的字幕源今日下载量将不能正确统计和判断

Jump to

Keyboard shortcuts

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