matcher

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Filter

type Filter struct {
	*regexp.Regexp
}

Filter is a wrapper for regexp

func (Filter) MarshalJSON

func (t Filter) MarshalJSON() ([]byte, error)

MarshalJSON returns a string from regexp and place it in the JSON stream

func (*Filter) UnmarshalJSON

func (t *Filter) UnmarshalJSON(b []byte) error

UnmarshalJSON takes the string from the stream and compile the regexp

type MatchRequest

type MatchRequest struct {
	Provider string
	// Fields for matching
	Show  string
	Title string
	// ShowID   string // Future use
	// TitleID  string // Future use
	// Pitch    string // Future use
	// Playlist    string // Playlist search is implemented in providers.
	MaxAgedDays int // Retrive media younger than MaxAgedDays when not zero

	Destination   string // Destination name when found
	ShowRootPath  string // Show/Movie path. For expisodes, actual season will append to the path
	RetentionDays int    // Media retention time, when not zero the system will delete old files
	TitleFilter   Filter // ShowTitle or Episode title must match this regexp to be downloaded
	TitleExclude  Filter // ShowTitle and Episode title must not match this regexp to be downloaded
	KeepBonus     bool   // When trie bonuses and trailer are retrieved
}

MatchRequest holds criterions for selecting show

func (MatchRequest) IsTitleMatch

func (m MatchRequest) IsTitleMatch(title string) bool

TODO implement IsTitleMatch for all providers

Jump to

Keyboard shortcuts

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