Documentation
¶
Overview ¶
Package releaseparse parses scene and P2P release names into core.ReleaseInfo. It is pure string work and safe for concurrent use.
Index ¶
- func EpisodeMatches(parsed core.ReleaseInfo, season, episode int) bool
- func HasUsableInfo(info core.ReleaseInfo) bool
- func IsObfuscated(title string) bool
- func NormalizeEdition(name string) string
- func NormalizeTitle(s string) string
- func Parse(name string) core.ReleaseInfo
- func ParseEdition(name string) string
- func TitleMatches(parsed core.ReleaseInfo, want string) bool
- func TitleYearMatches(parsed core.ReleaseInfo, want string, wantYear int) bool
- func TitlesMatch(a, b string) bool
- func YearMatches(got, want int) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EpisodeMatches ¶
func EpisodeMatches(parsed core.ReleaseInfo, season, episode int) bool
EpisodeMatches reports whether parsed info is exactly the wanted episode (not a season pack, season matches, episode is listed).
func HasUsableInfo ¶
func HasUsableInfo(info core.ReleaseInfo) bool
HasUsableInfo reports whether parsed info carries enough technical detail to consider a release whose title cannot be verified.
func IsObfuscated ¶
IsObfuscated reports whether a name/title looks like a hash or random string with no readable words.
func NormalizeEdition ¶
NormalizeEdition maps an edition label found in a release name (or an already-normalized one) to the canonical cut name, "" when there is no explicit cut. Two releases belong to the same cut when their normalized editions match.
func NormalizeTitle ¶
NormalizeTitle lowercases, strips diacritics and punctuation, expands "&" to "and", and drops a leading article, for title comparisons.
func Parse ¶
func Parse(name string) core.ReleaseInfo
Parse extracts structured info from a release name.
func ParseEdition ¶
ParseEdition identifies explicit cut labels without guessing from runtime.
func TitleMatches ¶
func TitleMatches(parsed core.ReleaseInfo, want string) bool
TitleMatches reports whether a parsed release title matches the wanted title.
func TitleYearMatches ¶
func TitleYearMatches(parsed core.ReleaseInfo, want string, wantYear int) bool
TitleYearMatches is TitleMatches plus a year check with ±1 tolerance. A zero year on either side skips the year check.
func TitlesMatch ¶
TitlesMatch reports whether two raw titles are the same after normalisation.
func YearMatches ¶
YearMatches reports whether two years agree within ±1 (zero = unknown).
Types ¶
This section is empty.