Documentation ¶
Index ¶
- Constants
- func Filename(filename string) string
- func Format(format string, p map[string]any) string
- func Md5Str(str string) string
- type AnimeEntity
- type AnimeParseOptions
- type ClientAddOptions
- type ClientDeleteOptions
- type ClientGetOptions
- type ClientListOptions
- type DownloadInfo
- type DownloadStatus
- type FeedItem
- type Object
- type Plugin
- type PluginExecuteOptions
- type PluginFunctionOptions
- type PluginLoadOptions
- type PluginVariableOptions
- type TitleParsed
- type TorrentContentItem
- type TorrentItem
- type TorrentState
Constants ¶
View Source
const ( MagnetType = "magnet" TorrentType = "torrent" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AnimeEntity ¶
type AnimeEntity struct { ID int `json:"id"` // bangumi id ThemoviedbID int `json:"themoviedb_id"` // themoviedb ID MikanID int `json:"mikan_id"` // [暂时无用] rss id Name string `json:"name"` // 名称,从bgm获取 NameCN string `json:"name_cn"` // 中文名称,从bgm获取 Season int `json:"season"` // 当前季,从themoviedb获取 Ep int `json:"ep"` // 当前集,从下载文件名解析 Eps int `json:"eps"` // [暂时无用] 总集数,从bgm获取 AirDate string `json:"air_date"` // 最初播放日期,从bgm获取 *DownloadInfo }
AnimeEntity 动画信息结构体
必须要有的值 NameCN: 用于保存文件名,可用 Name 和 ID 替代 Season: 用于保存文件名 Ep: 用于保存文件名 可选值 ID: bangumi id,用于生成nfo文件 ThemoviedbID: themoviedb id,用于生成nfo文件
func (*AnimeEntity) DirName ¶
func (b *AnimeEntity) DirName() string
func (*AnimeEntity) FileName ¶
func (b *AnimeEntity) FileName() string
func (*AnimeEntity) FullName ¶
func (b *AnimeEntity) FullName() string
func (*AnimeEntity) Meta ¶
func (b *AnimeEntity) Meta() string
type AnimeParseOptions ¶
type AnimeParseOptions struct { Url string Name string Parsed *TitleParsed }
type ClientAddOptions ¶
type ClientDeleteOptions ¶
type ClientGetOptions ¶
type ClientGetOptions struct { Hash string Item *TorrentItem }
type ClientListOptions ¶
type DownloadInfo ¶ added in v0.4.3
type DownloadStatus ¶ added in v0.5.0
type DownloadStatus struct { Hash string `json:"hash"` State TorrentState `json:"state"` Path string `json:"path"` // 文件存储相对 ExpireAt int64 `json:"expire_at"` // 过期时间 Init bool `json:"init"` // 是否初始化 Renamed bool `json:"renamed"` // 是否已重命名/移动 Downloaded bool `json:"downloaded"` // 是否已下载完成 Seeded bool `json:"seeded"` // 是否做种 Scraped bool `json:"scraped"` // 是否已经完成搜刮 }
type FeedItem ¶
type FeedItem struct { Url string `json:"url"` // Link,详情页连接,用于下一步解析番剧信息 Name string `json:"name"` // 种子名 Date string `json:"date"` // 发布日期 Type string `json:"type"` // 下载类型,[application/x-bittorrent] Download string `json:"download"` // 下载链接 Length int64 `json:"length"` // 种子大小 NameParsed *TitleParsed // 标题解析信息 }
func (FeedItem) DownloadType ¶ added in v0.4.3
DownloadType
@Description: 下载链接类型,[torrent, magnet, unknown] @receiver FeedItem @return string
type PluginExecuteOptions ¶ added in v0.6.7
type PluginFunctionOptions ¶ added in v0.7.1
type PluginLoadOptions ¶ added in v0.7.1
type PluginLoadOptions struct { File string Functions []*PluginFunctionOptions Variables []*PluginVariableOptions }
type PluginVariableOptions ¶ added in v0.7.1
type TitleParsed ¶ added in v0.6.5
type TitleParsed struct { TitleRaw string `json:"title_raw"` Name string `json:"title_jp"` NameCN string `json:"title_zh"` NameEN string `json:"title_en"` Season int `json:"season"` SeasonRaw string `json:"season_raw"` Ep int `json:"episode"` Sub string `json:"sub"` Group string `json:"group"` Definition string `json:"resolution"` Source string `json:"source"` }
type TorrentContentItem ¶
type TorrentItem ¶
type TorrentItem struct { // AddedOn int `json:"added_on"` // AmountLeft int `json:"amount_left"` // AutoTmm bool `json:"auto_tmm"` // Availability float64 `json:"availability"` // Category string `json:"category"` // Completed int `json:"completed"` // CompletionOn int `json:"completion_on"` ContentPath string `json:"content_path"` // DlLimit int `json:"dl_limit"` // Dlspeed int `json:"dlspeed"` // Downloaded int `json:"downloaded"` // DownloadedSession int `json:"downloaded_session"` // Eta int `json:"eta"` // FLPiecePrio bool `json:"f_l_piece_prio"` // ForceStart bool `json:"force_start"` Hash string `json:"hash"` // LastActivity int `json:"last_activity"` // MagnetUri string `json:"magnet_uri"` // MaxRatio float64 `json:"max_ratio"` // MaxSeedingTime int `json:"max_seeding_time"` Name string `json:"name"` // NumComplete int `json:"num_complete"` // NumIncomplete int `json:"num_incomplete"` // NumLeechs int `json:"num_leechs"` // NumSeeds int `json:"num_seeds"` // Priority int `json:"priority"` Progress float64 `json:"progress"` // Ratio float64 `json:"ratio"` // RatioLimit float64 `json:"ratio_limit"` // SavePath string `json:"save_path"` // SeedingTime int `json:"seeding_time"` // SeedingTimeLimit int `json:"seeding_time_limit"` // SeenComplete int `json:"seen_complete"` // SeqDl bool `json:"seq_dl"` // Size int `json:"size"` State string `json:"state"` }
type TorrentState ¶
type TorrentState string
Click to show internal directories.
Click to hide internal directories.