edition

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2026 License: MIT Imports: 2 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 edition detects movie editions (Director's Cut, Extended, IMAX, etc.) from scene release titles and filenames. It is a pure, stateless parser with no external dependencies.

Index

Constants

View Source
const EditionBonus = 30

EditionBonus is the score bonus awarded when a release matches the movie's preferred edition. Additive to the 0–100 quality score.

Variables

This section is empty.

Functions

func Bonus

func Bonus(preferred, release string) int

Bonus returns EditionBonus when the release edition matches the movie's preferred edition, 0 otherwise. Both values are compared case-insensitively. An empty preferred or release edition never earns a bonus.

func Canonical

func Canonical() []string

Canonical returns the list of canonical edition names that the parser recognises. Useful for populating UI dropdowns.

Types

type Edition

type Edition struct {
	// Name is the canonical edition label, e.g. "Director's Cut", "Extended".
	Name string
	// Raw is the matched token from the input, e.g. "Directors.Cut", "EXTENDED".
	Raw string
}

Edition represents a detected movie edition.

func Parse

func Parse(title string) *Edition

Parse extracts edition information from a release title or filename. Returns nil if no edition is detected. The absence of an edition tag means "unknown/default", NOT "Theatrical".

Parse is a pure function with no external dependencies.

Jump to

Keyboard shortcuts

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