Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var AllFieldStrategy = []FieldStrategy{ FieldStrategyIgnore, FieldStrategyMerge, FieldStrategyOverwrite, }
Functions ¶
This section is empty.
Types ¶
type FieldOptions ¶ added in v0.17.0
type FieldOptions struct { Field string `json:"field"` Strategy FieldStrategy `json:"strategy"` // creates missing objects if needed - only applicable for performers, tags and studios CreateMissing *bool `json:"createMissing"` }
type FieldStrategy ¶ added in v0.17.0
type FieldStrategy string
const ( // Never sets the field value FieldStrategyIgnore FieldStrategy = "IGNORE" // For multi-value fields, merge with existing. // For single-value fields, ignore if already set FieldStrategyMerge FieldStrategy = "MERGE" // Always replaces the value if a value is found. // For multi-value fields, any existing values are removed and replaced with the // scraped values. FieldStrategyOverwrite FieldStrategy = "OVERWRITE" )
func (FieldStrategy) IsValid ¶ added in v0.17.0
func (e FieldStrategy) IsValid() bool
func (FieldStrategy) MarshalGQL ¶ added in v0.17.0
func (e FieldStrategy) MarshalGQL(w io.Writer)
func (FieldStrategy) String ¶ added in v0.17.0
func (e FieldStrategy) String() string
func (*FieldStrategy) UnmarshalGQL ¶ added in v0.17.0
func (e *FieldStrategy) UnmarshalGQL(v interface{}) error
type MetadataOptions ¶ added in v0.17.0
type MetadataOptions struct { // any fields missing from here are defaulted to MERGE and createMissing false FieldOptions []*FieldOptions `json:"fieldOptions"` // defaults to true if not provided SetCoverImage *bool `json:"setCoverImage"` SetOrganized *bool `json:"setOrganized"` // defaults to true if not provided IncludeMalePerformers *bool `json:"includeMalePerformers"` }
type Options ¶ added in v0.17.0
type Options struct { // An ordered list of sources to identify items with. Only the first source that finds a match is used. Sources []*Source `json:"sources"` // Options defined here override the configured defaults Options *MetadataOptions `json:"options"` // scene ids to identify SceneIDs []string `json:"sceneIDs"` // paths of scenes to identify - ignored if scene ids are set Paths []string `json:"paths"` }
type PerformerCreator ¶ added in v0.17.0
type SceneIdentifier ¶
type SceneIdentifier struct { SceneReaderUpdater SceneReaderUpdater StudioCreator StudioCreator PerformerCreator PerformerCreator TagCreator TagCreator DefaultOptions *MetadataOptions Sources []ScraperSource SceneUpdatePostHookExecutor SceneUpdatePostHookExecutor }
type SceneReaderUpdater ¶ added in v0.17.0
type SceneReaderUpdater interface { GetCover(ctx context.Context, sceneID int) ([]byte, error) scene.Updater models.PerformerIDLoader models.TagIDLoader models.StashIDLoader }
type SceneScraper ¶
type SceneUpdatePostHookExecutor ¶
type SceneUpdatePostHookExecutor interface {
ExecuteSceneUpdatePostHooks(ctx context.Context, input models.SceneUpdateInput, inputFields []string)
}
type ScraperSource ¶
type ScraperSource struct { Name string Options *MetadataOptions Scraper SceneScraper RemoteSite string }
type Source ¶ added in v0.17.0
type Source struct { Source *scraper.Source `json:"source"` // Options defined for a source override the defaults Options *MetadataOptions `json:"options"` }
type StudioCreator ¶ added in v0.17.0
Click to show internal directories.
Click to hide internal directories.