classifier

package
v0.5.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 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
	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 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