zimuku

package
v0.46.1 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2023 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SortByPriority

type SortByPriority struct{ SubInfos }

func (SortByPriority) Less

func (s SortByPriority) Less(i, j int) bool

Less 根据元素的优先级降序排序

type SubInfo

type SubInfo struct {
	Name               string  // 字幕的名称
	Lang               string  // 语言
	AuthorInfo         string  // 作者
	Ext                string  // 后缀名
	Score              float32 // 评分
	DownloadTimes      int     // 下载的次数
	Priority           float32 // 优先级,使用评分和次数乘积而来,类似于 Score 投票
	DetailUrl          string  // 字幕的详情界面,需要再次分析具体的下载地址,地址需要拼接网站的根地址上去
	SubDownloadPageUrl string  // 字幕的具体的下载页面,会有多个下载可用的链接
	DownloadUrl        string  // 字幕的下载地址
	Season             int     // 第几季,默认-1
	Episode            int     // 第几集,默认-1
}

type SubInfos

type SubInfos []SubInfo

SubInfos 实现自定义排序

func (SubInfos) Len

func (s SubInfos) Len() int

func (SubInfos) Less

func (s SubInfos) Less(i, j int) bool

func (SubInfos) Swap

func (s SubInfos) Swap(i, j int)

type SubResult

type SubResult struct {
	Title     string   // 字幕的标题
	OtherName string   // 影片又名
	SubInfos  SubInfos // 字幕的列表
}

type Supplier

type Supplier struct {
	// contains filtered or unexported fields
}

func NewSupplier

func NewSupplier(fileDownloader *file_downloader.FileDownloader) *Supplier

func (*Supplier) CheckAlive

func (s *Supplier) CheckAlive() (bool, int64)

func (*Supplier) DownFile

func (s *Supplier) DownFile(browser *rod.Browser, subDownloadPageUrl string, TopN int64, Season, Episode int) (*supplier.SubInfo, error)

DownFile 第三级界面,具体字幕下载 ZiMuKuDownloadUrlStep3NotFound ZiMuKuDownloadUrlDownFileFailed

func (*Supplier) GetLogger

func (s *Supplier) GetLogger() *logrus.Logger

func (*Supplier) GetSubListFromFile4Anime

func (s *Supplier) GetSubListFromFile4Anime(seriesInfo *series.SeriesInfo) ([]supplier.SubInfo, error)

func (*Supplier) GetSubListFromFile4Movie

func (s *Supplier) GetSubListFromFile4Movie(filePath string) ([]supplier.SubInfo, error)

func (*Supplier) GetSubListFromFile4Series

func (s *Supplier) GetSubListFromFile4Series(seriesInfo *series.SeriesInfo) ([]supplier.SubInfo, error)

func (*Supplier) GetSupplierName

func (s *Supplier) GetSupplierName() string

func (*Supplier) IsAlive

func (s *Supplier) IsAlive() bool

func (*Supplier) OverDailyDownloadLimit

func (s *Supplier) OverDailyDownloadLimit() bool

Jump to

Keyboard shortcuts

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