mediasearch

package
v0.0.0-...-0d13a8a Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2021 License: MIT Imports: 11 Imported by: 6

Documentation

Index

Constants

View Source
const DefaultThreshold = 95

DefaultThreshold for matching names. 100 is a perfect match. This represents the string distance from the query (or filename) to the found movie/series title..

Variables

This section is empty.

Functions

func Normalize

func Normalize(s string) string

Normalize strings to become search terms

Types

type MediaType

type MediaType string

MediaType can be Movie or Series

const (
	//Series represents a tv series
	Series MediaType = "series"
	//Movie represents a movie
	Movie MediaType = "movie"
)

type Result

type Result struct {
	Title    string
	Year     string
	Type     MediaType
	IsDupe   bool
	Accuracy int
}

Result is a single search result

func Search(query, year, mediatype string) (Result, error)

Search for IMDB data (query is required, year and media type are optional)

func SearchThreshold

func SearchThreshold(query, year, mediatype string, threshold int) (Result, error)

SearchThreshold for IMDB data with a specific match threshoold

func (Result) String

func (r Result) String() string

Jump to

Keyboard shortcuts

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