engine

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2024 License: Apache-2.0 Imports: 58 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine

type Engine struct {
	// contains filtered or unexported fields
}

func Default

func Default() *Engine

func New

func New(db *gorm.DB, timeout time.Duration) *Engine

func (*Engine) AutoMigrate

func (e *Engine) AutoMigrate(v bool) error

func (*Engine) Fetch

func (e *Engine) Fetch(url string, provider mt.Provider) (*http.Response, error)

Fetch fetches content from url. If provider is nil, the default fetcher will be used.

func (*Engine) GetActorInfoByProviderID

func (e *Engine) GetActorInfoByProviderID(name, id string, lazy bool) (*model.ActorInfo, error)

func (*Engine) GetActorInfoByURL

func (e *Engine) GetActorInfoByURL(rawURL string, lazy bool) (*model.ActorInfo, error)

func (*Engine) GetActorPrimaryImage

func (e *Engine) GetActorPrimaryImage(name, id string) (image.Image, error)

func (*Engine) GetActorProviderByName

func (e *Engine) GetActorProviderByName(name string) (mt.ActorProvider, error)

func (*Engine) GetActorProviderByURL

func (e *Engine) GetActorProviderByURL(rawURL string) (mt.ActorProvider, error)

func (*Engine) GetActorProviders

func (e *Engine) GetActorProviders() map[string]mt.ActorProvider

func (*Engine) GetImageByURL

func (e *Engine) GetImageByURL(provider mt.Provider, url string, ratio, pos float64, auto bool) (img image.Image, err error)

func (*Engine) GetMovieBackdropImage

func (e *Engine) GetMovieBackdropImage(name, id string) (image.Image, error)

func (*Engine) GetMovieInfoByProviderID

func (e *Engine) GetMovieInfoByProviderID(name, id string, lazy bool) (*model.MovieInfo, error)

func (*Engine) GetMovieInfoByURL

func (e *Engine) GetMovieInfoByURL(rawURL string, lazy bool) (*model.MovieInfo, error)

func (*Engine) GetMoviePrimaryImage

func (e *Engine) GetMoviePrimaryImage(name, id string, ratio, pos float64) (image.Image, error)

func (*Engine) GetMovieProviderByName

func (e *Engine) GetMovieProviderByName(name string) (mt.MovieProvider, error)

func (*Engine) GetMovieProviderByURL

func (e *Engine) GetMovieProviderByURL(rawURL string) (mt.MovieProvider, error)

func (*Engine) GetMovieProviders

func (e *Engine) GetMovieProviders() map[string]mt.MovieProvider

func (*Engine) GetMovieReviewsByProviderID added in v1.2.0

func (e *Engine) GetMovieReviewsByProviderID(name, id string, lazy bool) (*model.MovieReviewInfo, error)

func (*Engine) GetMovieReviewsByProviderURL added in v1.2.0

func (e *Engine) GetMovieReviewsByProviderURL(name, rawURL string, lazy bool) (*model.MovieReviewInfo, error)

func (*Engine) GetMovieThumbImage

func (e *Engine) GetMovieThumbImage(name, id string) (image.Image, error)

func (*Engine) IsActorProvider

func (e *Engine) IsActorProvider(name string) (ok bool)

func (*Engine) IsMovieProvider

func (e *Engine) IsMovieProvider(name string) (ok bool)

func (*Engine) MustGetActorProviderByName

func (e *Engine) MustGetActorProviderByName(name string) mt.ActorProvider

func (*Engine) MustGetMovieProviderByName

func (e *Engine) MustGetMovieProviderByName(name string) mt.MovieProvider

func (*Engine) SearchActor

func (e *Engine) SearchActor(keyword, name string, fallback bool) ([]*model.ActorSearchResult, error)

func (*Engine) SearchActorAll

func (e *Engine) SearchActorAll(keyword string, fallback bool) (results []*model.ActorSearchResult, err error)

func (*Engine) SearchMovie

func (e *Engine) SearchMovie(keyword, name string, fallback bool) ([]*model.MovieSearchResult, error)

func (*Engine) SearchMovieAll

func (e *Engine) SearchMovieAll(keyword string, fallback bool) (results []*model.MovieSearchResult, err error)

SearchMovieAll searches the keyword from all providers.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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