dupechecking

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2026 License: GPL-2.0 Imports: 29 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. 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