Documentation ¶
Index ¶
- func AddGallery(qb models.SceneReaderWriter, id int, galleryID int) (bool, error)
- func AddPerformer(qb models.SceneReaderWriter, id int, performerID int) (bool, error)
- func AddTag(qb models.SceneReaderWriter, id int, tagID int) (bool, error)
- func GetDependentMovieIDs(sceneReader models.SceneReader, scene *models.Scene) ([]int, error)
- func GetDependentTagIDs(tags models.TagReader, markerReader models.SceneMarkerReader, ...) ([]int, error)
- func GetSceneMarkersJSON(markerReader models.SceneMarkerReader, tagReader models.TagReader, ...) ([]jsonschema.SceneMarker, error)
- func GetSceneMoviesJSON(movieReader models.MovieReader, sceneReader models.SceneReader, ...) ([]jsonschema.SceneMovie, error)
- func GetStudioName(reader models.StudioReader, scene *models.Scene) (string, error)
- func GetTagNames(reader models.TagReader, scene *models.Scene) ([]string, error)
- func ToBasicJSON(reader models.SceneReader, scene *models.Scene) (*jsonschema.Scene, error)
- func UpdateChecksum(qb models.SceneWriter, id int, checksum string) (*models.Scene, error)
- func UpdateFileModTime(qb models.SceneWriter, id int, modTime models.NullSQLiteTimestamp) (*models.Scene, error)
- func UpdateFormat(qb models.SceneWriter, id int, format string) (*models.Scene, error)
- func UpdateOSHash(qb models.SceneWriter, id int, oshash string) (*models.Scene, error)
- type Importer
- type MarkerImporter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddGallery ¶ added in v0.5.0
func AddPerformer ¶ added in v0.5.0
func GetDependentMovieIDs ¶
GetDependentMovieIDs returns a slice of movie IDs that this scene references.
func GetDependentTagIDs ¶
func GetDependentTagIDs(tags models.TagReader, markerReader models.SceneMarkerReader, scene *models.Scene) ([]int, error)
GetDependentTagIDs returns a slice of unique tag IDs that this scene references.
func GetSceneMarkersJSON ¶
func GetSceneMarkersJSON(markerReader models.SceneMarkerReader, tagReader models.TagReader, scene *models.Scene) ([]jsonschema.SceneMarker, error)
GetSceneMarkersJSON returns a slice of SceneMarker JSON representation objects corresponding to the provided scene's markers.
func GetSceneMoviesJSON ¶
func GetSceneMoviesJSON(movieReader models.MovieReader, sceneReader models.SceneReader, scene *models.Scene) ([]jsonschema.SceneMovie, error)
GetSceneMoviesJSON returns a slice of SceneMovie JSON representation objects corresponding to the provided scene's scene movie relationships.
func GetStudioName ¶
GetStudioName returns the name of the provided scene's studio. It returns an empty string if there is no studio assigned to the scene.
func GetTagNames ¶
GetTagNames returns a slice of tag names corresponding to the provided scene's tags.
func ToBasicJSON ¶
func ToBasicJSON(reader models.SceneReader, scene *models.Scene) (*jsonschema.Scene, error)
ToBasicJSON converts a scene object into its JSON object equivalent. It does not convert the relationships to other objects, with the exception of cover image.
func UpdateChecksum ¶ added in v0.5.0
func UpdateFileModTime ¶ added in v0.5.0
func UpdateFileModTime(qb models.SceneWriter, id int, modTime models.NullSQLiteTimestamp) (*models.Scene, error)
func UpdateFormat ¶ added in v0.5.0
func UpdateOSHash ¶ added in v0.5.0
Types ¶
type Importer ¶
type Importer struct { ReaderWriter models.SceneReaderWriter StudioWriter models.StudioReaderWriter GalleryWriter models.GalleryReaderWriter PerformerWriter models.PerformerReaderWriter MovieWriter models.MovieReaderWriter TagWriter models.TagReaderWriter Input jsonschema.Scene Path string MissingRefBehaviour models.ImportMissingRefEnum FileNamingAlgorithm models.HashAlgorithm ID int // contains filtered or unexported fields }
func (*Importer) FindExistingID ¶
func (*Importer) PostImport ¶
type MarkerImporter ¶
type MarkerImporter struct { SceneID int ReaderWriter models.SceneMarkerReaderWriter TagWriter models.TagReaderWriter Input jsonschema.SceneMarker MissingRefBehaviour models.ImportMissingRefEnum // contains filtered or unexported fields }
func (*MarkerImporter) Create ¶
func (i *MarkerImporter) Create() (*int, error)
func (*MarkerImporter) FindExistingID ¶
func (i *MarkerImporter) FindExistingID() (*int, error)
func (*MarkerImporter) Name ¶
func (i *MarkerImporter) Name() string
func (*MarkerImporter) PostImport ¶
func (i *MarkerImporter) PostImport(id int) error
func (*MarkerImporter) PreImport ¶
func (i *MarkerImporter) PreImport() error
func (*MarkerImporter) Update ¶
func (i *MarkerImporter) Update(id int) error