titlematch

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: 3 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 titlematch reports whether a release title plausibly belongs to a given movie. It guards auto-search, manual search, and RSS sync against indexers that return unrelated results for short or generic queries — for example, an indexer returning "The Firm 1993" when asked for "Big" (1988) will be rejected here even if the indexer's scoring would otherwise rank it as the best candidate.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Matches

func Matches(releaseTitle, movieTitle string, year int) bool

Matches reports whether releaseTitle is a plausible match for (movieTitle, year). A release matches when:

  • the normalized movie title appears as a word-boundary-aligned substring of the normalized release title, and
  • the release year (as a 4-digit string) also appears word-aligned, when year > 0. Movies without a known year accept title-only.

The year requirement is strict: a release that does not contain the correct year is rejected. Scene and p2p releases almost always carry the year in the filename, and this strictness is what catches indexers that return unrelated movies.

func Normalize

func Normalize(s string) string

Normalize lowercases a string, converts common separators (dots, underscores, hyphens) to spaces, strips other non-alphanumeric characters, and collapses whitespace.

Types

This section is empty.

Jump to

Keyboard shortcuts

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