Documentation ¶
Index ¶
- Constants
- Variables
- func DeleteGalleryFile(gallery *models.Gallery)
- func GenerateAPIKey(userID string) (string, error)
- func GetInstance() *singleton
- func GetSceneFileContainer(scene *models.Scene) (ffmpeg.Container, error)
- func GetSceneStreamPaths(scene *models.Scene, directStreamURL string, ...) ([]*models.SceneStreamEndpoint, error)
- func GetUserIDFromAPIKey(apiKey string) (string, error)
- func HasTranscode(scene *models.Scene, fileNamingAlgo models.HashAlgorithm) bool
- func Initialize() *singleton
- func IsServerDockerized() bool
- func KillRunningStreams(scene *models.Scene, fileNamingAlgo models.HashAlgorithm)
- func RegisterStream(filepath string, w *http.ResponseWriter)
- func ValidateModifyStudio(studio models.StudioPartial, qb models.StudioReader) error
- func ValidateVideoFileNamingAlgorithm(txnManager models.TransactionManager, newValue models.HashAlgorithm) error
- func WaitAndDeregisterStream(filepath string, w *http.ResponseWriter, r *http.Request)
- type APIKeyClaims
- type Action
- type DownloadStore
- type ExportTask
- func (t *ExportTask) ExportGalleries(workers int, repo models.ReaderRepository)
- func (t *ExportTask) ExportImages(workers int, repo models.ReaderRepository)
- func (t *ExportTask) ExportMovies(workers int, repo models.ReaderRepository)
- func (t *ExportTask) ExportPerformers(workers int, repo models.ReaderRepository)
- func (t *ExportTask) ExportScenes(workers int, repo models.ReaderRepository)
- func (t *ExportTask) ExportScrapedItems(repo models.ReaderRepository)
- func (t *ExportTask) ExportStudios(workers int, repo models.ReaderRepository)
- func (t *ExportTask) ExportTags(workers int, repo models.ReaderRepository)
- func (t *ExportTask) Start(wg *sync.WaitGroup)
- type GenerateInteractiveHeatmapSpeedTask
- type GenerateJob
- type GenerateMarkersTask
- type GeneratePhashTask
- type GeneratePreviewTask
- type GenerateScreenshotTask
- type GenerateSpriteTask
- type GenerateTranscodeTask
- type GeneratorInfo
- type GradientTable
- type IdentifyJob
- type ImportTask
- func (t *ImportTask) GetDescription() string
- func (t *ImportTask) ImportGalleries(ctx context.Context)
- func (t *ImportTask) ImportImages(ctx context.Context)
- func (t *ImportTask) ImportMovies(ctx context.Context)
- func (t *ImportTask) ImportPerformers(ctx context.Context)
- func (t *ImportTask) ImportScenes(ctx context.Context)
- func (t *ImportTask) ImportScrapedItems(ctx context.Context)
- func (t *ImportTask) ImportStudio(studioJSON *jsonschema.Studio, pendingParent map[string][]*jsonschema.Studio, ...) error
- func (t *ImportTask) ImportStudios(ctx context.Context)
- func (t *ImportTask) ImportTag(tagJSON *jsonschema.Tag, pendingParent map[string][]*jsonschema.Tag, fail bool, ...) error
- func (t *ImportTask) ImportTags(ctx context.Context)
- func (t *ImportTask) Start(ctx context.Context)
- type InteractiveHeatmapSpeedGenerator
- type MigrateHashTask
- type PhashGenerator
- type PreviewGenerator
- type ScanJob
- type ScanTask
- type SceneFilenameParser
- type SceneServer
- type Script
- type SpriteGenerator
- type StashBoxPerformerTagTask
- type Task
Constants ¶
const APIKeySubject = "APIKey"
Variables ¶
var ErrInput = errors.New("invalid request input")
var ErrInvalidToken = errors.New("invalid apikey")
Functions ¶
func DeleteGalleryFile ¶ added in v0.4.0
func GenerateAPIKey ¶ added in v0.7.0
func GetInstance ¶
func GetInstance() *singleton
func GetSceneFileContainer ¶ added in v0.3.0
func GetSceneStreamPaths ¶ added in v0.3.0
func GetSceneStreamPaths(scene *models.Scene, directStreamURL string, maxStreamingTranscodeSize models.StreamingResolutionEnum) ([]*models.SceneStreamEndpoint, error)
func GetUserIDFromAPIKey ¶ added in v0.7.0
GetUserIDFromAPIKey validates the provided api key and returns the user ID
func HasTranscode ¶
func HasTranscode(scene *models.Scene, fileNamingAlgo models.HashAlgorithm) bool
HasTranscode returns true if a transcoded video exists for the provided scene. It will check using the OSHash of the scene first, then fall back to the checksum.
func Initialize ¶
func Initialize() *singleton
func IsServerDockerized ¶ added in v0.11.0
func IsServerDockerized() bool
func KillRunningStreams ¶
func KillRunningStreams(scene *models.Scene, fileNamingAlgo models.HashAlgorithm)
func RegisterStream ¶
func RegisterStream(filepath string, w *http.ResponseWriter)
func ValidateModifyStudio ¶ added in v0.3.0
func ValidateModifyStudio(studio models.StudioPartial, qb models.StudioReader) error
func ValidateVideoFileNamingAlgorithm ¶ added in v0.3.0
func ValidateVideoFileNamingAlgorithm(txnManager models.TransactionManager, newValue models.HashAlgorithm) error
ValidateVideoFileNamingAlgorithm validates changing the VideoFileNamingAlgorithm configuration flag.
If setting VideoFileNamingAlgorithm to MD5, then this function will ensure that all checksum values are set on all scenes.
Likewise, if VideoFileNamingAlgorithm is set to oshash, then this function will ensure that all oshash values are set on all scenes.
func WaitAndDeregisterStream ¶
func WaitAndDeregisterStream(filepath string, w *http.ResponseWriter, r *http.Request)
Types ¶
type APIKeyClaims ¶ added in v0.7.0
type APIKeyClaims struct { UserID string `json:"uid"` jwt.StandardClaims }
type Action ¶ added in v0.12.0
type Action struct { // At time in milliseconds the action should fire. At int64 `json:"at"` // Pos is the place in percent to move to. Pos int `json:"pos"` Slope float64 Intensity int64 Speed float64 }
Action is a move at a specific time.
type DownloadStore ¶ added in v0.4.0
type DownloadStore struct {
// contains filtered or unexported fields
}
DownloadStore manages single-use generated files for the UI to download.
func NewDownloadStore ¶ added in v0.4.0
func NewDownloadStore() *DownloadStore
func (*DownloadStore) RegisterFile ¶ added in v0.4.0
func (s *DownloadStore) RegisterFile(fp string, contentType string, keep bool) string
func (*DownloadStore) Serve ¶ added in v0.4.0
func (s *DownloadStore) Serve(hash string, w http.ResponseWriter, r *http.Request)
type ExportTask ¶
type ExportTask struct { Mappings *jsonschema.Mappings DownloadHash string // contains filtered or unexported fields }
func CreateExportTask ¶ added in v0.4.0
func CreateExportTask(a models.HashAlgorithm, input models.ExportObjectsInput) *ExportTask
func (*ExportTask) ExportGalleries ¶
func (t *ExportTask) ExportGalleries(workers int, repo models.ReaderRepository)
func (*ExportTask) ExportImages ¶ added in v0.4.0
func (t *ExportTask) ExportImages(workers int, repo models.ReaderRepository)
func (*ExportTask) ExportMovies ¶ added in v0.2.0
func (t *ExportTask) ExportMovies(workers int, repo models.ReaderRepository)
func (*ExportTask) ExportPerformers ¶
func (t *ExportTask) ExportPerformers(workers int, repo models.ReaderRepository)
func (*ExportTask) ExportScenes ¶
func (t *ExportTask) ExportScenes(workers int, repo models.ReaderRepository)
func (*ExportTask) ExportScrapedItems ¶
func (t *ExportTask) ExportScrapedItems(repo models.ReaderRepository)
func (*ExportTask) ExportStudios ¶
func (t *ExportTask) ExportStudios(workers int, repo models.ReaderRepository)
func (*ExportTask) ExportTags ¶ added in v0.3.0
func (t *ExportTask) ExportTags(workers int, repo models.ReaderRepository)
func (*ExportTask) Start ¶
func (t *ExportTask) Start(wg *sync.WaitGroup)
type GenerateInteractiveHeatmapSpeedTask ¶ added in v0.12.0
type GenerateInteractiveHeatmapSpeedTask struct { Scene models.Scene Overwrite bool TxnManager models.TransactionManager // contains filtered or unexported fields }
func (*GenerateInteractiveHeatmapSpeedTask) GetDescription ¶ added in v0.12.0
func (t *GenerateInteractiveHeatmapSpeedTask) GetDescription() string
func (*GenerateInteractiveHeatmapSpeedTask) Start ¶ added in v0.12.0
func (t *GenerateInteractiveHeatmapSpeedTask) Start(ctx context.Context)
type GenerateJob ¶ added in v0.11.0
type GenerateJob struct {
// contains filtered or unexported fields
}
type GenerateMarkersTask ¶
type GenerateMarkersTask struct { TxnManager models.TransactionManager Scene *models.Scene Marker *models.SceneMarker Overwrite bool ImagePreview bool Screenshot bool // contains filtered or unexported fields }
func (*GenerateMarkersTask) GetDescription ¶ added in v0.11.0
func (t *GenerateMarkersTask) GetDescription() string
func (*GenerateMarkersTask) Start ¶
func (t *GenerateMarkersTask) Start(ctx context.Context)
type GeneratePhashTask ¶ added in v0.7.0
type GeneratePhashTask struct { Scene models.Scene Overwrite bool // contains filtered or unexported fields }
func (*GeneratePhashTask) GetDescription ¶ added in v0.11.0
func (t *GeneratePhashTask) GetDescription() string
func (*GeneratePhashTask) Start ¶ added in v0.7.0
func (t *GeneratePhashTask) Start(ctx context.Context)
type GeneratePreviewTask ¶
type GeneratePreviewTask struct { Scene models.Scene ImagePreview bool Options models.GeneratePreviewOptionsInput Overwrite bool // contains filtered or unexported fields }
func (*GeneratePreviewTask) GetDescription ¶ added in v0.11.0
func (t *GeneratePreviewTask) GetDescription() string
func (*GeneratePreviewTask) Start ¶
func (t *GeneratePreviewTask) Start(ctx context.Context)
type GenerateScreenshotTask ¶ added in v0.2.0
type GenerateScreenshotTask struct { Scene models.Scene ScreenshotAt *float64 // contains filtered or unexported fields }
func (*GenerateScreenshotTask) Start ¶ added in v0.2.0
func (t *GenerateScreenshotTask) Start(ctx context.Context)
type GenerateSpriteTask ¶
type GenerateSpriteTask struct { Scene models.Scene Overwrite bool // contains filtered or unexported fields }
func (*GenerateSpriteTask) GetDescription ¶ added in v0.11.0
func (t *GenerateSpriteTask) GetDescription() string
func (*GenerateSpriteTask) Start ¶
func (t *GenerateSpriteTask) Start(ctx context.Context)
type GenerateTranscodeTask ¶
type GenerateTranscodeTask struct { Scene models.Scene Overwrite bool // is true, generate even if video is browser-supported Force bool // contains filtered or unexported fields }
func (*GenerateTranscodeTask) GetDescription ¶ added in v0.11.0
func (t *GenerateTranscodeTask) GetDescription() string
func (*GenerateTranscodeTask) Start ¶
func (t *GenerateTranscodeTask) Start(ctc context.Context)
type GeneratorInfo ¶
type GradientTable ¶ added in v0.12.0
type GradientTable []struct { Col colorful.Color Pos float64 }
func (GradientTable) GetInterpolatedColorFor ¶ added in v0.12.0
func (gt GradientTable) GetInterpolatedColorFor(t float64) colorful.Color
type IdentifyJob ¶ added in v0.11.0
type IdentifyJob struct {
// contains filtered or unexported fields
}
func CreateIdentifyJob ¶ added in v0.11.0
func CreateIdentifyJob(input models.IdentifyMetadataInput) *IdentifyJob
type ImportTask ¶
type ImportTask struct { BaseDir string TmpZip string Reset bool DuplicateBehaviour models.ImportDuplicateEnum MissingRefBehaviour models.ImportMissingRefEnum // contains filtered or unexported fields }
func CreateImportTask ¶ added in v0.4.0
func CreateImportTask(a models.HashAlgorithm, input models.ImportObjectsInput) (*ImportTask, error)
func (*ImportTask) GetDescription ¶ added in v0.8.0
func (t *ImportTask) GetDescription() string
func (*ImportTask) ImportGalleries ¶
func (t *ImportTask) ImportGalleries(ctx context.Context)
func (*ImportTask) ImportImages ¶ added in v0.4.0
func (t *ImportTask) ImportImages(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) ImportStudio ¶ added in v0.3.0
func (t *ImportTask) ImportStudio(studioJSON *jsonschema.Studio, pendingParent map[string][]*jsonschema.Studio, readerWriter models.StudioReaderWriter) error
func (*ImportTask) ImportStudios ¶
func (t *ImportTask) ImportStudios(ctx context.Context)
func (*ImportTask) ImportTag ¶ added in v0.10.0
func (t *ImportTask) ImportTag(tagJSON *jsonschema.Tag, pendingParent map[string][]*jsonschema.Tag, fail bool, readerWriter models.TagReaderWriter) error
func (*ImportTask) ImportTags ¶
func (t *ImportTask) ImportTags(ctx context.Context)
func (*ImportTask) Start ¶
func (t *ImportTask) Start(ctx context.Context)
type InteractiveHeatmapSpeedGenerator ¶ added in v0.12.0
type InteractiveHeatmapSpeedGenerator struct { InteractiveSpeed int64 Funscript Script FunscriptPath string HeatmapPath string Width int Height int NumSegments int }
func NewInteractiveHeatmapSpeedGenerator ¶ added in v0.12.0
func NewInteractiveHeatmapSpeedGenerator(funscriptPath string, heatmapPath string) *InteractiveHeatmapSpeedGenerator
func (*InteractiveHeatmapSpeedGenerator) Generate ¶ added in v0.12.0
func (g *InteractiveHeatmapSpeedGenerator) Generate() error
func (*InteractiveHeatmapSpeedGenerator) LoadFunscriptData ¶ added in v0.12.0
func (g *InteractiveHeatmapSpeedGenerator) LoadFunscriptData(path string) (Script, error)
func (*InteractiveHeatmapSpeedGenerator) RenderHeatmap ¶ added in v0.12.0
func (g *InteractiveHeatmapSpeedGenerator) RenderHeatmap() error
funscript needs to have intensity updated first
type MigrateHashTask ¶ added in v0.3.0
MigrateHashTask renames generated files between oshash and MD5 based on the value of the fileNamingAlgorithm flag.
func (*MigrateHashTask) Start ¶ added in v0.3.0
func (t *MigrateHashTask) Start()
Start starts the task.
type PhashGenerator ¶ added in v0.7.0
type PhashGenerator struct { Info *GeneratorInfo VideoChecksum string Columns int Rows int }
func NewPhashGenerator ¶ added in v0.7.0
func NewPhashGenerator(videoFile ffmpeg.VideoFile, checksum string) (*PhashGenerator, error)
func (*PhashGenerator) Generate ¶ added in v0.7.0
func (g *PhashGenerator) Generate() (*uint64, error)
type PreviewGenerator ¶
type PreviewGenerator struct { Info *GeneratorInfo VideoChecksum string VideoFilename string ImageFilename string OutputDirectory string GenerateVideo bool GenerateImage bool PreviewPreset string Overwrite bool }
func NewPreviewGenerator ¶
func (*PreviewGenerator) Generate ¶
func (g *PreviewGenerator) Generate() error
type ScanTask ¶
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 ¶
func (p *SceneFilenameParser) Parse(repo models.ReaderRepository) ([]*models.SceneParserResult, int, error)
type SceneServer ¶ added in v0.8.0
type SceneServer struct {
TXNManager models.TransactionManager
}
func (*SceneServer) ServeScreenshot ¶ added in v0.8.0
func (s *SceneServer) ServeScreenshot(scene *models.Scene, w http.ResponseWriter, r *http.Request)
func (*SceneServer) StreamSceneDirect ¶ added in v0.8.0
func (s *SceneServer) StreamSceneDirect(scene *models.Scene, w http.ResponseWriter, r *http.Request)
type Script ¶ added in v0.12.0
type Script struct { // Version of Launchscript Version string `json:"version"` // Inverted causes up and down movement to be flipped. Inverted bool `json:"inverted,omitempty"` // Range is the percentage of a full stroke to use. Range int `json:"range,omitempty"` // Actions are the timed moves. Actions []Action `json:"actions"` AvarageSpeed int64 }
func (*Script) CalculateMedian ¶ added in v0.12.0
func (*Script) UpdateIntensityAndSpeed ¶ added in v0.12.0
func (funscript *Script) UpdateIntensityAndSpeed()
type SpriteGenerator ¶
type SpriteGenerator struct { Info *GeneratorInfo VideoChecksum string ImageOutputPath string VTTOutputPath string Rows int Columns int Overwrite bool }
func NewSpriteGenerator ¶
func (*SpriteGenerator) Generate ¶
func (g *SpriteGenerator) Generate() error
type StashBoxPerformerTagTask ¶ added in v0.7.0
type StashBoxPerformerTagTask struct {
// contains filtered or unexported fields
}
func (*StashBoxPerformerTagTask) Description ¶ added in v0.8.0
func (t *StashBoxPerformerTagTask) Description() string
func (*StashBoxPerformerTagTask) Start ¶ added in v0.7.0
func (t *StashBoxPerformerTagTask) Start()
Source Files ¶
- apikey.go
- checksum.go
- downloads.go
- exclude_files.go
- filename_parser.go
- gallery.go
- generator.go
- generator_interactive_heatmap_speed.go
- generator_phash.go
- generator_preview.go
- generator_sprite.go
- image.go
- import.go
- json_utils.go
- manager.go
- manager_tasks.go
- post_migrate.go
- running_streams.go
- scene.go
- screenshot.go
- studio.go
- subscribe.go
- task.go
- task_autotag.go
- task_clean.go
- task_export.go
- task_generate.go
- task_generate_interactive_heatmap_speed.go
- task_generate_markers.go
- task_generate_phash.go
- task_generate_preview.go
- task_generate_screenshot.go
- task_generate_sprite.go
- task_identify.go
- task_import.go
- task_migrate_hash.go
- task_plugin.go
- task_scan.go
- task_scan_gallery.go
- task_scan_image.go
- task_scan_scene.go
- task_stash_box_tag.go
- task_transcode.go