dupechecking

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2026 License: GPL-2.0 Imports: 31 Imported by: 0

Documentation

Overview

Package dupechecking runs tracker-specific duplicate searches and converts the results into upload review state.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilterDupes

func FilterDupes(dupes []api.DupeEntry, meta api.PreparedMetadata, tracker string, _ config.Config, _ api.Logger) ([]api.DupeEntry, api.DupeMatch)

Types

type Service

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

Service coordinates duplicate checks across configured tracker handlers.

func NewService

func NewService(cfg config.Config, logger api.Logger) *Service

NewService builds a duplicate-checking service with shared HTTP and tracker metadata clients.

func (*Service) Check

func (s *Service) Check(ctx context.Context, meta api.PreparedMetadata, trackers []string) (api.DupeCheckSummary, error)

Check searches the requested trackers for duplicates of meta.SourcePath. Missing source paths return an error, an empty tracker list returns a summary note, and context cancellation stops queued work, waits briefly for active workers, and returns a cancellation error instead of a partial summary. Trackers blocked by rule failures or banned release groups are returned as skipped results without running the tracker search handler. Per-tracker rule skips remain terminal over banned-group skips in the returned result. When meta has an effective release group, Check refreshes dynamic banned group caches before per-tracker rule skips so the once-per-TTL cache maintenance still runs for the requested tracker set. Progress callback panics are logged and do not abort the duplicate check.

Jump to

Keyboard shortcuts

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