manager

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2020 License: AGPL-3.0 Imports: 37 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteGeneratedSceneFiles

func DeleteGeneratedSceneFiles(scene *models.Scene)

func DeleteSceneFile

func DeleteSceneFile(scene *models.Scene)

func DeleteSceneMarkerFiles added in v0.2.0

func DeleteSceneMarkerFiles(scene *models.Scene, seconds int)

func DestroyScene

func DestroyScene(sceneID int, tx *sqlx.Tx) error

func GetInstance

func GetInstance() *singleton

func HasTranscode

func HasTranscode(scene *models.Scene) (bool, error)

func Initialize

func Initialize() *singleton

func IsStreamable

func IsStreamable(scene *models.Scene) (bool, error)

func KillRunningStreams

func KillRunningStreams(path string)

func RegisterStream

func RegisterStream(filepath string, w *http.ResponseWriter)

func SetSceneScreenshot

func SetSceneScreenshot(checksum string, imageData []byte) error

func WaitAndDeregisterStream

func WaitAndDeregisterStream(filepath string, w *http.ResponseWriter, r *http.Request)

Types

type AutoTagPerformerTask

type AutoTagPerformerTask struct {
	// contains filtered or unexported fields
}

func (*AutoTagPerformerTask) Start

func (t *AutoTagPerformerTask) Start(wg *sync.WaitGroup)

type AutoTagStudioTask

type AutoTagStudioTask struct {
	// contains filtered or unexported fields
}

func (*AutoTagStudioTask) Start

func (t *AutoTagStudioTask) Start(wg *sync.WaitGroup)

type AutoTagTagTask

type AutoTagTagTask struct {
	// contains filtered or unexported fields
}

func (*AutoTagTagTask) Start

func (t *AutoTagTagTask) Start(wg *sync.WaitGroup)

type CleanTask

type CleanTask struct {
	Scene   *models.Scene
	Gallery *models.Gallery
}

func (*CleanTask) Start

func (t *CleanTask) Start(wg *sync.WaitGroup)

type ExportTask

type ExportTask struct {
	Mappings *jsonschema.Mappings
	Scraped  []jsonschema.ScrapedItem
}

func (*ExportTask) ExportGalleries

func (t *ExportTask) ExportGalleries(ctx context.Context)

func (*ExportTask) ExportMovies added in v0.2.0

func (t *ExportTask) ExportMovies(ctx context.Context, workers int)

func (*ExportTask) ExportPerformers

func (t *ExportTask) ExportPerformers(ctx context.Context, workers int)

func (*ExportTask) ExportScenes

func (t *ExportTask) ExportScenes(ctx context.Context, workers int)

func (*ExportTask) ExportScrapedItems

func (t *ExportTask) ExportScrapedItems(ctx context.Context)

func (*ExportTask) ExportStudios

func (t *ExportTask) ExportStudios(ctx context.Context, workers int)

func (*ExportTask) Start

func (t *ExportTask) Start(wg *sync.WaitGroup)

type GenerateGthumbsTask added in v0.2.0

type GenerateGthumbsTask struct {
	Gallery models.Gallery
}

func (*GenerateGthumbsTask) Start added in v0.2.0

func (t *GenerateGthumbsTask) Start(wg *sync.WaitGroup)

type GenerateMarkersTask

type GenerateMarkersTask struct {
	Scene models.Scene
}

func (*GenerateMarkersTask) Start

func (t *GenerateMarkersTask) Start(wg *sync.WaitGroup)

type GeneratePreviewTask

type GeneratePreviewTask struct {
	Scene         models.Scene
	ImagePreview  bool
	PreviewPreset string
}

func (*GeneratePreviewTask) Start

func (t *GeneratePreviewTask) Start(wg *sync.WaitGroup)

type GenerateScreenshotTask added in v0.2.0

type GenerateScreenshotTask struct {
	Scene        models.Scene
	ScreenshotAt *float64
}

func (*GenerateScreenshotTask) Start added in v0.2.0

func (t *GenerateScreenshotTask) Start(wg *sync.WaitGroup)

type GenerateSpriteTask

type GenerateSpriteTask struct {
	Scene models.Scene
}

func (*GenerateSpriteTask) Start

func (t *GenerateSpriteTask) Start(wg *sync.WaitGroup)

type GenerateTranscodeTask

type GenerateTranscodeTask struct {
	Scene models.Scene
}

func (*GenerateTranscodeTask) Start

func (t *GenerateTranscodeTask) Start(wg *sync.WaitGroup)

type GeneratorInfo

type GeneratorInfo struct {
	ChunkCount     int
	FrameRate      float64
	NumberOfFrames int
	NthFrame       int

	VideoFile ffmpeg.VideoFile
}

type ImportTask

type ImportTask struct {
	Mappings *jsonschema.Mappings
	Scraped  []jsonschema.ScrapedItem
}

func (*ImportTask) ImportGalleries

func (t *ImportTask) ImportGalleries(ctx context.Context)

func (*ImportTask) ImportMovies added in v0.2.0

func (t *ImportTask) ImportMovies(ctx context.Context)

func (*ImportTask) ImportPerformers

func (t *ImportTask) ImportPerformers(ctx context.Context)

func (*ImportTask) ImportScenes

func (t *ImportTask) ImportScenes(ctx context.Context)

func (*ImportTask) ImportScrapedItems

func (t *ImportTask) ImportScrapedItems(ctx context.Context)

func (*ImportTask) ImportStudios

func (t *ImportTask) ImportStudios(ctx context.Context)

func (*ImportTask) ImportTags

func (t *ImportTask) ImportTags(ctx context.Context)

func (*ImportTask) Start

func (t *ImportTask) Start(wg *sync.WaitGroup)

type JobStatus

type JobStatus int
const (
	Idle     JobStatus = 0
	Import   JobStatus = 1
	Export   JobStatus = 2
	Scan     JobStatus = 3
	Generate JobStatus = 4
	Clean    JobStatus = 5
	Scrape   JobStatus = 6
	AutoTag  JobStatus = 7
)

func (JobStatus) String

func (s JobStatus) String() string

type PreviewGenerator

type PreviewGenerator struct {
	Info *GeneratorInfo

	VideoFilename   string
	ImageFilename   string
	OutputDirectory string

	GenerateVideo bool
	GenerateImage bool

	PreviewPreset string
}

func NewPreviewGenerator

func NewPreviewGenerator(videoFile ffmpeg.VideoFile, videoFilename string, imageFilename string, outputDirectory string, generateVideo bool, generateImage bool, previewPreset string) (*PreviewGenerator, error)

func (*PreviewGenerator) Generate

func (g *PreviewGenerator) Generate() error

type ScanTask

type ScanTask struct {
	FilePath        string
	UseFileMetadata bool
}

func (*ScanTask) Start

func (t *ScanTask) Start(wg *sync.WaitGroup)

type SceneFilenameParser

type SceneFilenameParser struct {
	Pattern     string
	ParserInput models.SceneParserInput
	Filter      *models.FindFilterType
	// contains filtered or unexported fields
}

func NewSceneFilenameParser

func NewSceneFilenameParser(filter *models.FindFilterType, config models.SceneParserInput) *SceneFilenameParser

func (*SceneFilenameParser) Parse

type SpriteGenerator

type SpriteGenerator struct {
	Info *GeneratorInfo

	ImageOutputPath string
	VTTOutputPath   string
	Rows            int
	Columns         int
}

func NewSpriteGenerator

func NewSpriteGenerator(videoFile ffmpeg.VideoFile, imageOutputPath string, vttOutputPath string, rows int, cols int) (*SpriteGenerator, error)

func (*SpriteGenerator) Generate

func (g *SpriteGenerator) Generate() error

type Task

type Task interface {
	Start(wg *sync.WaitGroup)
}

type TaskStatus

type TaskStatus struct {
	Status     JobStatus
	Progress   float64
	LastUpdate time.Time
	// contains filtered or unexported fields
}

func (*TaskStatus) SetStatus

func (t *TaskStatus) SetStatus(s JobStatus)

func (*TaskStatus) Stop

func (t *TaskStatus) Stop() bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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