gallery

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2022 License: AGPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddImage added in v0.5.0

func AddImage(qb models.GalleryReaderWriter, galleryID int, imageID int) error

func AddPerformer added in v0.7.0

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

func AddTag added in v0.7.0

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

func CountByPerformerID added in v0.7.0

func CountByPerformerID(r models.GalleryReader, id int) (int, error)

func CountByStudioID added in v0.7.0

func CountByStudioID(r models.GalleryReader, id int) (int, error)

func CountByTagID added in v0.7.0

func CountByTagID(r models.GalleryReader, id int) (int, error)

func FileScanner added in v0.11.0

func FileScanner(hasher file.Hasher) file.Scanner

func GetChecksums added in v0.5.0

func GetChecksums(galleries []*models.Gallery) []string

func GetIDs

func GetIDs(galleries []*models.Gallery) []int

func GetStudioName

func GetStudioName(reader models.StudioReader, gallery *models.Gallery) (string, error)

GetStudioName returns the name of the provided gallery's studio. It returns an empty string if there is no studio assigned to the gallery.

func PathsFilter added in v0.12.0

func PathsFilter(paths []string) *models.GalleryFilterType

func ToBasicJSON

func ToBasicJSON(gallery *models.Gallery) (*jsonschema.Gallery, error)

ToBasicJSON converts a gallery object into its JSON object equivalent. It does not convert the relationships to other objects.

func UpdateFileModTime added in v0.5.0

func UpdateFileModTime(qb models.GalleryWriter, id int, modTime models.NullSQLiteTimestamp) (*models.Gallery, error)

Types

type Importer

type Importer struct {
	ReaderWriter        models.GalleryReaderWriter
	StudioWriter        models.StudioReaderWriter
	PerformerWriter     models.PerformerReaderWriter
	TagWriter           models.TagReaderWriter
	Input               jsonschema.Gallery
	MissingRefBehaviour models.ImportMissingRefEnum
	// 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 Scanner added in v0.11.0

type Scanner struct {
	file.Scanner

	ImageExtensions    []string
	StripFileExtension bool
	Ctx                context.Context
	CaseSensitiveFs    bool
	TxnManager         models.TransactionManager
	Paths              *paths.Paths
	PluginCache        *plugin.Cache
	MutexManager       *utils.MutexManager
}

func (*Scanner) ScanExisting added in v0.11.0

func (scanner *Scanner) ScanExisting(existing file.FileBased, file file.SourceFile) (retGallery *models.Gallery, scanImages bool, err error)

func (*Scanner) ScanNew added in v0.11.0

func (scanner *Scanner) ScanNew(file file.SourceFile) (retGallery *models.Gallery, scanImages bool, err error)

Jump to

Keyboard shortcuts

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