Documentation ¶
Overview ¶
Package autotag provides methods to auto-tag scenes with performers, studios and tags.
The autotag engine tags scenes with performers/studios/tags if the scene's path matches the performer/studio/tag name. A scene's path is considered a match if it contains the performer/studio/tag's full name, ignoring any '.', '-', '_' characters in the path.
For example, for a performer "foo bar", the following paths would be considered a match: "foo bar.mp4", "foobar.mp4", "foo.bar.mp4", "foo-bar.mp4", "aaa.foo bar.bbb.mp4". The following would not be considered a match: "aafoo bar.mp4", "foo barbb.mp4", "foo/bar.mp4"
Index ¶
- func GalleryPerformers(ctx context.Context, s *models.Gallery, rw GalleryPerformerUpdater, ...) error
- func GalleryStudios(ctx context.Context, s *models.Gallery, rw GalleryFinderUpdater, ...) error
- func GalleryTags(ctx context.Context, s *models.Gallery, rw GalleryTagUpdater, ...) error
- func ImagePerformers(ctx context.Context, s *models.Image, rw ImagePerformerUpdater, ...) error
- func ImageStudios(ctx context.Context, s *models.Image, rw ImageFinderUpdater, ...) error
- func ImageTags(ctx context.Context, s *models.Image, rw ImageTagUpdater, ...) error
- func ScenePerformers(ctx context.Context, s *models.Scene, rw ScenePerformerUpdater, ...) error
- func SceneStudios(ctx context.Context, s *models.Scene, rw SceneFinderUpdater, ...) error
- func SceneTags(ctx context.Context, s *models.Scene, rw SceneTagUpdater, ...) error
- type GalleryFinderUpdater
- type GalleryPerformerUpdater
- type GalleryQueryPerformerUpdater
- type GalleryQueryTagUpdater
- type GalleryTagUpdater
- type ImageFinderUpdater
- type ImagePerformerUpdater
- type ImageQueryPerformerUpdater
- type ImageQueryTagUpdater
- type ImageTagUpdater
- type SceneFinderUpdater
- type ScenePerformerUpdater
- type SceneQueryPerformerUpdater
- type SceneQueryTagUpdater
- type SceneTagUpdater
- type Tagger
- func (tagger *Tagger) PerformerGalleries(ctx context.Context, p *models.Performer, paths []string, ...) error
- func (tagger *Tagger) PerformerImages(ctx context.Context, p *models.Performer, paths []string, ...) error
- func (tagger *Tagger) PerformerScenes(ctx context.Context, p *models.Performer, paths []string, ...) error
- func (tagger *Tagger) StudioGalleries(ctx context.Context, p *models.Studio, paths []string, aliases []string, ...) error
- func (tagger *Tagger) StudioImages(ctx context.Context, p *models.Studio, paths []string, aliases []string, ...) error
- func (tagger *Tagger) StudioScenes(ctx context.Context, p *models.Studio, paths []string, aliases []string, ...) error
- func (tagger *Tagger) TagGalleries(ctx context.Context, p *models.Tag, paths []string, aliases []string, ...) error
- func (tagger *Tagger) TagImages(ctx context.Context, p *models.Tag, paths []string, aliases []string, ...) error
- func (tagger *Tagger) TagScenes(ctx context.Context, p *models.Tag, paths []string, aliases []string, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GalleryPerformers ¶
func GalleryPerformers(ctx context.Context, s *models.Gallery, rw GalleryPerformerUpdater, performerReader match.PerformerAutoTagQueryer, cache *match.Cache) error
GalleryPerformers tags the provided gallery with performers whose name matches the gallery's path.
func GalleryStudios ¶
func GalleryStudios(ctx context.Context, s *models.Gallery, rw GalleryFinderUpdater, studioReader match.StudioAutoTagQueryer, cache *match.Cache) error
GalleryStudios tags the provided gallery with the first studio whose name matches the gallery's path.
Gallerys will not be tagged if studio is already set.
func GalleryTags ¶
func GalleryTags(ctx context.Context, s *models.Gallery, rw GalleryTagUpdater, tagReader match.TagAutoTagQueryer, cache *match.Cache) error
GalleryTags tags the provided gallery with tags whose name matches the gallery's path.
func ImagePerformers ¶
func ImagePerformers(ctx context.Context, s *models.Image, rw ImagePerformerUpdater, performerReader match.PerformerAutoTagQueryer, cache *match.Cache) error
ImagePerformers tags the provided image with performers whose name matches the image's path.
func ImageStudios ¶
func ImageStudios(ctx context.Context, s *models.Image, rw ImageFinderUpdater, studioReader match.StudioAutoTagQueryer, cache *match.Cache) error
ImageStudios tags the provided image with the first studio whose name matches the image's path.
Images will not be tagged if studio is already set.
func ImageTags ¶
func ImageTags(ctx context.Context, s *models.Image, rw ImageTagUpdater, tagReader match.TagAutoTagQueryer, cache *match.Cache) error
ImageTags tags the provided image with tags whose name matches the image's path.
func ScenePerformers ¶
func ScenePerformers(ctx context.Context, s *models.Scene, rw ScenePerformerUpdater, performerReader match.PerformerAutoTagQueryer, cache *match.Cache) error
ScenePerformers tags the provided scene with performers whose name matches the scene's path.
func SceneStudios ¶
func SceneStudios(ctx context.Context, s *models.Scene, rw SceneFinderUpdater, studioReader match.StudioAutoTagQueryer, cache *match.Cache) error
SceneStudios tags the provided scene with the first studio whose name matches the scene's path.
Scenes will not be tagged if studio is already set.
Types ¶
type GalleryFinderUpdater ¶ added in v0.17.0
type GalleryPerformerUpdater ¶ added in v0.17.0
type GalleryPerformerUpdater interface { models.PerformerIDLoader gallery.PartialUpdater }
type GalleryQueryPerformerUpdater ¶ added in v0.17.0
type GalleryQueryPerformerUpdater interface { gallery.Queryer models.PerformerIDLoader gallery.PartialUpdater }
type GalleryQueryTagUpdater ¶ added in v0.17.0
type GalleryQueryTagUpdater interface { gallery.Queryer models.TagIDLoader gallery.PartialUpdater }
type GalleryTagUpdater ¶ added in v0.17.0
type GalleryTagUpdater interface { models.TagIDLoader gallery.PartialUpdater }
type ImageFinderUpdater ¶ added in v0.17.0
type ImagePerformerUpdater ¶ added in v0.17.0
type ImagePerformerUpdater interface { models.PerformerIDLoader image.PartialUpdater }
type ImageQueryPerformerUpdater ¶ added in v0.17.0
type ImageQueryPerformerUpdater interface { image.Queryer models.PerformerIDLoader image.PartialUpdater }
type ImageQueryTagUpdater ¶ added in v0.17.0
type ImageQueryTagUpdater interface { image.Queryer models.TagIDLoader image.PartialUpdater }
type ImageTagUpdater ¶ added in v0.17.0
type ImageTagUpdater interface { models.TagIDLoader image.PartialUpdater }
type SceneFinderUpdater ¶ added in v0.17.0
type SceneFinderUpdater interface { scene.Queryer scene.PartialUpdater }
type ScenePerformerUpdater ¶ added in v0.17.0
type ScenePerformerUpdater interface { models.PerformerIDLoader scene.PartialUpdater }
type SceneQueryPerformerUpdater ¶ added in v0.17.0
type SceneQueryPerformerUpdater interface { scene.Queryer models.PerformerIDLoader scene.PartialUpdater }
type SceneQueryTagUpdater ¶ added in v0.17.0
type SceneQueryTagUpdater interface { scene.Queryer models.TagIDLoader scene.PartialUpdater }
type SceneTagUpdater ¶ added in v0.17.0
type SceneTagUpdater interface { models.TagIDLoader scene.PartialUpdater }
type Tagger ¶ added in v0.18.0
func (*Tagger) PerformerGalleries ¶ added in v0.18.0
func (tagger *Tagger) PerformerGalleries(ctx context.Context, p *models.Performer, paths []string, rw GalleryQueryPerformerUpdater) error
PerformerGalleries searches for galleries whose path matches the provided performer name and tags the gallery with the performer.
func (*Tagger) PerformerImages ¶ added in v0.18.0
func (tagger *Tagger) PerformerImages(ctx context.Context, p *models.Performer, paths []string, rw ImageQueryPerformerUpdater) error
PerformerImages searches for images whose path matches the provided performer name and tags the image with the performer.
func (*Tagger) PerformerScenes ¶ added in v0.18.0
func (tagger *Tagger) PerformerScenes(ctx context.Context, p *models.Performer, paths []string, rw SceneQueryPerformerUpdater) error
PerformerScenes searches for scenes whose path matches the provided performer name and tags the scene with the performer. Performer aliases must be loaded.
func (*Tagger) StudioGalleries ¶ added in v0.18.0
func (tagger *Tagger) StudioGalleries(ctx context.Context, p *models.Studio, paths []string, aliases []string, rw GalleryFinderUpdater) error
StudioGalleries searches for galleries whose path matches the provided studio name and tags the gallery with the studio, if studio is not already set on the gallery.
func (*Tagger) StudioImages ¶ added in v0.18.0
func (tagger *Tagger) StudioImages(ctx context.Context, p *models.Studio, paths []string, aliases []string, rw ImageFinderUpdater) error
StudioImages searches for images whose path matches the provided studio name and tags the image with the studio, if studio is not already set on the image.
func (*Tagger) StudioScenes ¶ added in v0.18.0
func (tagger *Tagger) StudioScenes(ctx context.Context, p *models.Studio, paths []string, aliases []string, rw SceneFinderUpdater) error
StudioScenes searches for scenes whose path matches the provided studio name and tags the scene with the studio, if studio is not already set on the scene.
func (*Tagger) TagGalleries ¶ added in v0.18.0
func (tagger *Tagger) TagGalleries(ctx context.Context, p *models.Tag, paths []string, aliases []string, rw GalleryQueryTagUpdater) error
TagGalleries searches for galleries whose path matches the provided tag name and tags the gallery with the tag.