Documentation
¶
Index ¶
- func PathToGalleriesFn(ctx context.Context, name string, paths []string, ...) error
- func PathToImagesFn(ctx context.Context, name string, paths []string, imageReader image.Queryer, ...) error
- func PathToPerformers(ctx context.Context, path string, reader PerformerAutoTagQueryer, cache *Cache, ...) ([]*models.Performer, error)
- func PathToScenesFn(ctx context.Context, name string, paths []string, sceneReader scene.Queryer, ...) error
- func PathToStudio(ctx context.Context, path string, reader StudioAutoTagQueryer, cache *Cache, ...) (*models.Studio, error)
- func PathToTags(ctx context.Context, path string, reader TagAutoTagQueryer, cache *Cache, ...) ([]*models.Tag, error)
- func ScrapedMovie(ctx context.Context, qb MovieNamesFinder, m *models.ScrapedMovie) error
- func ScrapedPerformer(ctx context.Context, qb PerformerFinder, p *models.ScrapedPerformer, ...) error
- func ScrapedStudio(ctx context.Context, qb StudioFinder, s *models.ScrapedStudio, ...) error
- func ScrapedTag(ctx context.Context, qb tag.Queryer, s *models.ScrapedTag) error
- type Cache
- type MovieNamesFinder
- type PerformerAutoTagQueryer
- type PerformerFinder
- type StudioAutoTagQueryer
- type StudioFinder
- type TagAutoTagQueryer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PathToGalleriesFn ¶ added in v0.18.0
func PathToGalleriesFn(ctx context.Context, name string, paths []string, galleryReader gallery.Queryer, fn func(ctx context.Context, scene *models.Gallery) error) error
func PathToImagesFn ¶ added in v0.18.0
func PathToImagesFn(ctx context.Context, name string, paths []string, imageReader image.Queryer, fn func(ctx context.Context, scene *models.Image) error) error
func PathToPerformers ¶
func PathToPerformers(ctx context.Context, path string, reader PerformerAutoTagQueryer, cache *Cache, trimExt bool) ([]*models.Performer, error)
func PathToScenesFn ¶ added in v0.18.0
func PathToScenesFn(ctx context.Context, name string, paths []string, sceneReader scene.Queryer, fn func(ctx context.Context, scene *models.Scene) error) error
func PathToStudio ¶ added in v0.12.0
func PathToStudio(ctx context.Context, path string, reader StudioAutoTagQueryer, cache *Cache, trimExt bool) (*models.Studio, error)
PathToStudio returns the Studio that matches the given path. Where multiple matching studios are found, the one that matches the latest position in the path is returned.
func PathToTags ¶
func PathToTags(ctx context.Context, path string, reader TagAutoTagQueryer, cache *Cache, trimExt bool) ([]*models.Tag, error)
func ScrapedMovie ¶
func ScrapedMovie(ctx context.Context, qb MovieNamesFinder, m *models.ScrapedMovie) error
ScrapedMovie matches the provided movie with the movies in the database and sets the ID field if one is found.
func ScrapedPerformer ¶
func ScrapedPerformer(ctx context.Context, qb PerformerFinder, p *models.ScrapedPerformer, stashBoxEndpoint *string) error
ScrapedPerformer matches the provided performer with the performers in the database and sets the ID field if one is found.
func ScrapedStudio ¶
func ScrapedStudio(ctx context.Context, qb StudioFinder, s *models.ScrapedStudio, stashBoxEndpoint *string) error
ScrapedStudio matches the provided studio with the studios in the database and sets the ID field if one is found.
func ScrapedTag ¶
func ScrapedTag(ctx context.Context, qb tag.Queryer, s *models.ScrapedTag) error
ScrapedTag matches the provided tag with the tags in the database and sets the ID field if one is found.
Types ¶
type Cache ¶ added in v0.14.0
type Cache struct {
// contains filtered or unexported fields
}
Cache is used to cache queries that should not change across an autotag process.
type MovieNamesFinder ¶ added in v0.17.0
type MovieNamesFinder interface {
FindByNames(ctx context.Context, names []string, nocase bool) ([]*models.Movie, error)
}
type PerformerAutoTagQueryer ¶ added in v0.17.0
type PerformerAutoTagQueryer interface {
Query(ctx context.Context, performerFilter *models.PerformerFilterType, findFilter *models.FindFilterType) ([]*models.Performer, int, error)
QueryForAutoTag(ctx context.Context, words []string) ([]*models.Performer, error)
models.AliasLoader
}
type PerformerFinder ¶ added in v0.17.0
type PerformerFinder interface {
FindByNames(ctx context.Context, names []string, nocase bool) ([]*models.Performer, error)
FindByStashID(ctx context.Context, stashID models.StashID) ([]*models.Performer, error)
}
type StudioAutoTagQueryer ¶ added in v0.17.0
type StudioAutoTagQueryer interface {
QueryForAutoTag(ctx context.Context, words []string) ([]*models.Studio, error)
studio.Queryer
GetAliases(ctx context.Context, studioID int) ([]string, error)
}
type StudioFinder ¶ added in v0.17.0
type StudioFinder interface {
studio.Queryer
FindByStashID(ctx context.Context, stashID models.StashID) ([]*models.Studio, error)
}
type TagAutoTagQueryer ¶ added in v0.17.0
type TagAutoTagQueryer interface {
QueryForAutoTag(ctx context.Context, words []string) ([]*models.Tag, error)
tag.Queryer
GetAliases(ctx context.Context, tagID int) ([]string, error)
}