blocklist

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2026 License: AGPL-3.0 Imports: 4 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 blocklist remembers releases that failed for a reason that is the release's fault, so automation does not grab the same dud again.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Key

func Key(releaseTitle string) string

Key is how titles are compared: case and surrounding whitespace ignored.

Types

type Entry

type Entry struct {
	ID           int64
	ReleaseTitle string
	Protocol     string
	Reason       string
	MovieID      int64 // 0 if not tied to a movie
	SeriesID     int64 // 0 if not tied to a series
	CreatedAt    time.Time
}

Entry is one blocklisted release.

type Repo

type Repo struct {
	// contains filtered or unexported fields
}

func NewRepo

func NewRepo(db *sql.DB) *Repo

func (*Repo) Add

func (r *Repo) Add(e Entry) error

Add blocklists a release; adding one that is already blocklisted just refreshes its reason and timestamp.

func (*Repo) Clear

func (r *Repo) Clear() error

func (*Repo) CountRecent

func (r *Repo) CountRecent(movieID, seriesID int64, since time.Time) (int, error)

CountRecent counts entries for a movie (movieID) or series (seriesID) added since the given time — the guard that stops automatic retries from chewing through an endless list of bad releases.

func (*Repo) Keys

func (r *Repo) Keys() (map[string]bool, error)

Keys returns the set of blocklisted title keys, for filtering search results.

func (*Repo) List

func (r *Repo) List() ([]Entry, error)

func (*Repo) Remove

func (r *Repo) Remove(id int64) error

Jump to

Keyboard shortcuts

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