scene

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2021 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddGallery added in v0.5.0

func AddGallery(qb models.SceneReaderWriter, id int, galleryID int) (bool, error)

func AddPerformer added in v0.5.0

func AddPerformer(qb models.SceneReaderWriter, id int, performerID int) (bool, error)

func AddTag added in v0.5.0

func AddTag(qb models.SceneReaderWriter, id int, tagID int) (bool, error)

func GetDependentMovieIDs

func GetDependentMovieIDs(sceneReader models.SceneReader, scene *models.Scene) ([]int, error)

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

func GetStudioName(reader models.StudioReader, scene *models.Scene) (string, error)

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

func GetTagNames(reader models.TagReader, scene *models.Scene) ([]string, error)

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 UpdateChecksum(qb models.SceneWriter, id int, checksum string) (*models.Scene, error)

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 UpdateFormat(qb models.SceneWriter, id int, format string) (*models.Scene, error)

func UpdateOSHash added in v0.5.0

func UpdateOSHash(qb models.SceneWriter, id int, oshash string) (*models.Scene, error)

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) Create

func (i *Importer) Create() (*int, error)

func (*Importer) FindExistingID

func (i *Importer) FindExistingID() (*int, error)

func (*Importer) Name

func (i *Importer) Name() string

func (*Importer) PostImport

func (i *Importer) PostImport(id int) error

func (*Importer) PreImport

func (i *Importer) PreImport() error

func (*Importer) Update

func (i *Importer) Update(id int) error

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

Jump to

Keyboard shortcuts

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