classifier

package
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoMatch = errors.New("no match")
)

Functions

This section is empty.

Types

type Classification added in v0.5.0

type Classification struct {
	ContentType model.NullContentType
	Content     *model.Content
	ContentAttributes
}

func (*Classification) ApplyHint added in v0.5.0

func (c *Classification) ApplyHint(h model.TorrentHint)

type Classifier

type Classifier interface {
	Classify(ctx context.Context, torrent model.Torrent) (Classification, error)
}

type ContentAttributes added in v0.5.0

type ContentAttributes struct {
	Languages       model.Languages
	LanguageMulti   bool
	Episodes        model.Episodes
	VideoResolution model.NullVideoResolution
	VideoSource     model.NullVideoSource
	VideoCodec      model.NullVideoCodec
	Video3d         model.NullVideo3d
	VideoModifier   model.NullVideoModifier
	ReleaseGroup    model.NullString
}

func (*ContentAttributes) ApplyHint added in v0.5.0

func (a *ContentAttributes) ApplyHint(h model.TorrentHint)

type FallbackClassifier added in v0.5.0

type FallbackClassifier struct{}

func (FallbackClassifier) Classify added in v0.5.0

func (FallbackClassifier) Key added in v0.5.0

func (c FallbackClassifier) Key() string

func (FallbackClassifier) Priority added in v0.5.0

func (c FallbackClassifier) Priority() int

type Params

type Params struct {
	fx.In
	SubClassifiers []lazy.Lazy[SubClassifier] `group:"content_classifiers"`
	Logger         *zap.SugaredLogger
}

type Result

type Result struct {
	fx.Out
	Classifier lazy.Lazy[Classifier]
}

func New

func New(p Params) Result

type SubClassifier added in v0.5.0

type SubClassifier interface {
	Classifier
	Key() string
	Priority() int
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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