meta

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2026 License: MIT Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package meta 解析 PT 种子的标题与副标题:中英文名、年份、类型、季与集(含范围、「全 N 集」「第 1-10 集」)、 分辨率、来源、编码、HDR、音轨、制作组、版本,以及中字、国语、粤语等标记。只看文字,不联网,不会 panic。

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MediaType

type MediaType string

MediaType 是媒体类型。

const (
	TypeUnknown MediaType = ""
	TypeMovie   MediaType = "movie"
	TypeTV      MediaType = "tv"
)

type Meta

type Meta struct {
	NameCN        string    `json:"name_cn,omitempty"`
	NameEN        string    `json:"name_en,omitempty"`
	Year          int       `json:"year,omitempty"`
	Type          MediaType `json:"type,omitempty"`
	Season        int       `json:"season,omitempty"`
	SeasonEnd     int       `json:"season_end,omitempty"`
	Episode       int       `json:"episode,omitempty"`
	EpisodeEnd    int       `json:"episode_end,omitempty"`
	TotalEpisodes int       `json:"total_episodes,omitempty"`
	// Complete 表示整季(或多季)的合集:只写了季、写了 Complete,或写了「全 N 集」。
	Complete    bool     `json:"complete,omitempty"`
	Resolution  string   `json:"resolution,omitempty"`
	Source      string   `json:"source,omitempty"`
	Remux       bool     `json:"remux,omitempty"`
	Platform    string   `json:"platform,omitempty"`
	VideoCodec  string   `json:"video_codec,omitempty"`
	BitDepth    int      `json:"bit_depth,omitempty"`
	FPS         int      `json:"fps,omitempty"`
	HDR         []string `json:"hdr,omitempty"`
	Audio       []string `json:"audio,omitempty"`
	Channels    string   `json:"channels,omitempty"`
	Group       string   `json:"group,omitempty"`
	Edition     []string `json:"edition,omitempty"`
	Version     string   `json:"version,omitempty"`
	ThreeD      bool     `json:"three_d,omitempty"`
	ChineseSubs bool     `json:"chinese_subs,omitempty"`
	Mandarin    bool     `json:"mandarin,omitempty"`
	Cantonese   bool     `json:"cantonese,omitempty"`
}

Meta 是解析结果。没解析出来的字段是零值。

func Parse

func Parse(title, subtitle string) Meta

Parse 解析标题与副标题。中文名先看标题,标题里没有时看副标题;季与集先看标题,标题里没有时看副标题。

func (Meta) String

func (m Meta) String() string

String 是给人看的简短描述:名字加年份,剧集加季与集。

Jump to

Keyboard shortcuts

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