subtitle_best

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: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Api

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

func NewApi

func NewApi(headerToken string, apiKey string) *Api

func (*Api) GetDownloadUrl

func (a *Api) GetDownloadUrl(client *resty.Client, subSha256, imdbID string,
	isMovie bool, season, episode int,
	seasonPackageId string, language int,
	token string) (*GetUrlResponse, *LimitInfo, error)

GetDownloadUrl 获取字幕下载地址

func (*Api) QueryMovieSubtitle

func (a *Api) QueryMovieSubtitle(client *resty.Client, imdbID string) (*SubtitleResponse, *LimitInfo, error)

QueryMovieSubtitle 查询电影的字幕

func (*Api) QueryTVEpsSubtitle

func (a *Api) QueryTVEpsSubtitle(client *resty.Client, imdbID string, season, episode int) (*SubtitleResponse, *LimitInfo, error)

QueryTVEpsSubtitle 查询连续剧 一季 一集的字幕

func (*Api) QueryTVSeasonPackageByID

func (a *Api) QueryTVSeasonPackageByID(client *resty.Client, imdbID string, seasonPackageId string) (*SubtitleResponse, *LimitInfo, error)

QueryTVSeasonPackageByID 查询连续剧 一季 一字幕包的字幕

func (*Api) QueryTVSeasonPackages

func (a *Api) QueryTVSeasonPackages(client *resty.Client, imdbID string, season int) (*SeasonPackagesResponse, *LimitInfo, error)

QueryTVSeasonPackages 查询连续剧 一季的字幕包 ID 列表

type DownloadUrlConvertRequest

type DownloadUrlConvertRequest struct {
	SubSha256       string `json:"sub_sha256"`
	ImdbID          string `json:"imdb_id"`
	IsMovie         bool   `json:"is_movie"`
	Season          int    `json:"season"`
	Episode         int    `json:"episode"`
	SeasonPackageId string `json:"season_package_id"`
	Language        int    `json:"language"`
	ApiKey          string `json:"api_key"`
	Token           string `json:"token"`
}

type GetUrlResponse

type GetUrlResponse struct {
	Status       int    `json:"status"`
	Message      string `json:"message"`
	DownloadLink string `json:"download_link"`
}

type LimitInfo

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

func NewHeaderInfo

func NewHeaderInfo(resp *resty.Response) *LimitInfo

func (LimitInfo) DailyCount

func (h LimitInfo) DailyCount() int

func (LimitInfo) DailyLimit

func (h LimitInfo) DailyLimit() int

func (LimitInfo) RateLimitLimit

func (h LimitInfo) RateLimitLimit() int

func (LimitInfo) RateLimitRemaining

func (h LimitInfo) RateLimitRemaining() int

func (LimitInfo) RateLimitReset

func (h LimitInfo) RateLimitReset() int

type SearchMovieSubtitleRequest

type SearchMovieSubtitleRequest struct {
	ImdbID string `json:"imdb_id"`
	ApiKey string `json:"api_key"`
}

type SearchTVEpsSubtitleRequest

type SearchTVEpsSubtitleRequest struct {
	ImdbID  string `json:"imdb_id"`
	Season  int    `json:"season"`
	Episode int    `json:"episode"`
	ApiKey  string `json:"api_key"`
}

type SearchTVSeasonPackageByIDRequest

type SearchTVSeasonPackageByIDRequest struct {
	ImdbID          string `json:"imdb_id"`
	SeasonPackageId string `json:"season_package_id"`
	ApiKey          string `json:"api_key"`
}

type SearchTVSeasonPackagesRequest

type SearchTVSeasonPackagesRequest struct {
	ImdbID string `json:"imdb_id"`
	Season int    `json:"season"`
	ApiKey string `json:"api_key"`
}

type SeasonPackagesResponse

type SeasonPackagesResponse struct {
	Status           int      `json:"status"`
	Message          string   `json:"message"`
	SeasonPackageIds []string `json:"season_package_ids"`
}

type Subtitle

type Subtitle struct {
	SubSha256 string `json:"sub_sha256"`
	Title     string `json:"title"`
	Language  int    `json:"language"`
	Ext       string `json:"ext"`
	IsMovie   bool   `json:"is_movie"`
	Season    int    `json:"season"`
	Episode   int    `json:"episode"`
	Token     string `json:"token"`
}

type SubtitleResponse

type SubtitleResponse struct {
	Status    int        `json:"status"`
	Message   string     `json:"message"`
	Subtitles []Subtitle `json:"subtitles"`
}

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) 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