config

package
v0.17.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	Stash               = "stash"
	Cache               = "cache"
	BackupDirectoryPath = "backup_directory_path"
	Generated           = "generated"
	Metadata            = "metadata"
	Downloads           = "downloads"
	ApiKey              = "api_key"
	Username            = "username"
	Password            = "password"
	MaxSessionAge       = "max_session_age"

	DefaultMaxSessionAge = 60 * 60 * 1 // 1 hours

	Database = "database"

	Exclude      = "exclude"
	ImageExclude = "image_exclude"

	VideoExtensions            = "video_extensions"
	ImageExtensions            = "image_extensions"
	GalleryExtensions          = "gallery_extensions"
	CreateGalleriesFromFolders = "create_galleries_from_folders"

	// CalculateMD5 is the config key used to determine if MD5 should be calculated
	// for video files.
	CalculateMD5 = "calculate_md5"

	// VideoFileNamingAlgorithm is the config key used to determine what hash
	// should be used when generating and using generated files for scenes.
	VideoFileNamingAlgorithm = "video_file_naming_algorithm"

	MaxTranscodeSize          = "max_transcode_size"
	MaxStreamingTranscodeSize = "max_streaming_transcode_size"

	ParallelTasks = "parallel_tasks"

	PreviewPreset = "preview_preset"

	PreviewAudio = "preview_audio"

	PreviewSegmentDuration = "preview_segment_duration"

	PreviewSegments = "preview_segments"

	PreviewExcludeStart = "preview_exclude_start"

	PreviewExcludeEnd = "preview_exclude_end"

	WriteImageThumbnails = "write_image_thumbnails"

	Host = "host"

	Port = "port"

	ExternalHost = "external_host"

	// key used to sign JWT tokens
	JWTSignKey = "jwt_secret_key"

	// key used for session store
	SessionStoreKey = "session_store_key"

	// scraping options
	ScrapersPath              = "scrapers_path"
	ScraperUserAgent          = "scraper_user_agent"
	ScraperCertCheck          = "scraper_cert_check"
	ScraperCDPPath            = "scraper_cdp_path"
	ScraperExcludeTagPatterns = "scraper_exclude_tag_patterns"

	// stash-box options
	StashBoxes = "stash_boxes"

	PythonPath = "python_path"

	// plugin options
	PluginsPath = "plugins_path"

	// i18n
	Language = "language"

	// served directories
	// this should be manually configured only
	CustomServedFolders = "custom_served_folders"

	// UI directory. Overrides to serve the UI from a specific location
	// rather than use the embedded UI.
	CustomUILocation = "custom_ui_location"

	// Interface options
	MenuItems = "menu_items"

	SoundOnPreview = "sound_on_preview"

	WallShowTitle = "wall_show_title"

	CustomPerformerImageLocation = "custom_performer_image_location"
	MaximumLoopDuration          = "maximum_loop_duration"
	AutostartVideo               = "autostart_video"
	AutostartVideoOnPlaySelected = "autostart_video_on_play_selected"

	ContinuePlaylistDefault = "continue_playlist_default"
	ShowStudioAsText        = "show_studio_as_text"
	CSSEnabled              = "cssEnabled"
	CustomLocalesEnabled    = "customLocalesEnabled"

	ShowScrubber = "show_scrubber"

	WallPlayback = "wall_playback"

	ImageLightboxSlideshowDelay             = "image_lightbox.slideshow_delay"
	ImageLightboxDisplayModeKey             = "image_lightbox.display_mode"
	ImageLightboxScaleUp                    = "image_lightbox.scale_up"
	ImageLightboxResetZoomOnNav             = "image_lightbox.reset_zoom_on_nav"
	ImageLightboxScrollModeKey              = "image_lightbox.scroll_mode"
	ImageLightboxScrollAttemptsBeforeChange = "image_lightbox.scroll_attempts_before_change"

	UI = "ui"

	DisableDropdownCreatePerformer = "disable_dropdown_create.performer"
	DisableDropdownCreateStudio    = "disable_dropdown_create.studio"
	DisableDropdownCreateTag       = "disable_dropdown_create.tag"

	HandyKey        = "handy_key"
	FunscriptOffset = "funscript_offset"

	ThemeColor        = "theme_color"
	DefaultThemeColor = "#202b33"

	SecurityTripwireAccessedFromPublicInternet = "security_tripwire_accessed_from_public_internet"

	// DLNA options
	DLNAServerName         = "dlna.server_name"
	DLNADefaultEnabled     = "dlna.default_enabled"
	DLNADefaultIPWhitelist = "dlna.default_whitelist"
	DLNAInterfaces         = "dlna.interfaces"

	// Logging options
	LogFile = "logFile"
	LogOut  = "logOut"

	LogLevel = "logLevel"

	LogAccess = "logAccess"

	// Default settings
	DefaultScanSettings     = "defaults.scan_task"
	DefaultIdentifySettings = "defaults.identify_task"
	DefaultAutoTagSettings  = "defaults.auto_tag_task"
	DefaultGenerateSettings = "defaults.generate_task"

	DeleteFileDefault      = "defaults.delete_file"
	DeleteGeneratedDefault = "defaults.delete_generated"

	// Desktop Integration Options
	NoBrowser                           = "noBrowser"
	NoBrowserDefault                    = false
	NotificationsEnabled                = "notifications_enabled"
	NotificationsEnabledDefault         = true
	ShowOneTimeMovedNotification        = "show_one_time_moved_notification"
	ShowOneTimeMovedNotificationDefault = false

	// File upload options
	MaxUploadSize = "max_upload_size"
)

Variables

Functions

func FileEnvSet

func FileEnvSet() bool

FileEnvSet returns true if the configuration file environment parameter is set.

func IsOfficialBuild

func IsOfficialBuild() bool

Types

type AutoTagMetadataOptions added in v0.17.0

type AutoTagMetadataOptions struct {
	// IDs of performers to tag files with, or "*" for all
	Performers []string `json:"performers"`
	// IDs of studios to tag files with, or "*" for all
	Studios []string `json:"studios"`
	// IDs of tags to tag files with, or "*" for all
	Tags []string `json:"tags"`
}

type ConfigDisableDropdownCreate added in v0.17.0

type ConfigDisableDropdownCreate struct {
	Performer bool `json:"performer"`
	Tag       bool `json:"tag"`
	Studio    bool `json:"studio"`
}

type ConfigImageLightboxResult added in v0.17.0

type ConfigImageLightboxResult struct {
	SlideshowDelay             *int                      `json:"slideshowDelay"`
	DisplayMode                *ImageLightboxDisplayMode `json:"displayMode"`
	ScaleUp                    *bool                     `json:"scaleUp"`
	ResetZoomOnNav             *bool                     `json:"resetZoomOnNav"`
	ScrollMode                 *ImageLightboxScrollMode  `json:"scrollMode"`
	ScrollAttemptsBeforeChange int                       `json:"scrollAttemptsBeforeChange"`
}

type ImageLightboxDisplayMode

type ImageLightboxDisplayMode string
const (
	ImageLightboxDisplayModeOriginal ImageLightboxDisplayMode = "ORIGINAL"
	ImageLightboxDisplayModeFitXy    ImageLightboxDisplayMode = "FIT_XY"
	ImageLightboxDisplayModeFitX     ImageLightboxDisplayMode = "FIT_X"
)

func (ImageLightboxDisplayMode) IsValid added in v0.17.0

func (e ImageLightboxDisplayMode) IsValid() bool

func (ImageLightboxDisplayMode) MarshalGQL added in v0.17.0

func (e ImageLightboxDisplayMode) MarshalGQL(w io.Writer)

func (ImageLightboxDisplayMode) String added in v0.17.0

func (e ImageLightboxDisplayMode) String() string

func (*ImageLightboxDisplayMode) UnmarshalGQL added in v0.17.0

func (e *ImageLightboxDisplayMode) UnmarshalGQL(v interface{}) error

type ImageLightboxScrollMode

type ImageLightboxScrollMode string
const (
	ImageLightboxScrollModeZoom ImageLightboxScrollMode = "ZOOM"
	ImageLightboxScrollModePanY ImageLightboxScrollMode = "PAN_Y"
)

func (ImageLightboxScrollMode) IsValid added in v0.17.0

func (e ImageLightboxScrollMode) IsValid() bool

func (ImageLightboxScrollMode) MarshalGQL added in v0.17.0

func (e ImageLightboxScrollMode) MarshalGQL(w io.Writer)

func (ImageLightboxScrollMode) String added in v0.17.0

func (e ImageLightboxScrollMode) String() string

func (*ImageLightboxScrollMode) UnmarshalGQL added in v0.17.0

func (e *ImageLightboxScrollMode) UnmarshalGQL(v interface{}) error

type Instance

type Instance struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func GetInstance

func GetInstance() *Instance

func Initialize

func Initialize() (*Instance, error)

func (*Instance) ActivatePublicAccessTripwire

func (i *Instance) ActivatePublicAccessTripwire(requestIP string) error

ActivatePublicAccessTripwire sets the security_tripwire_accessed_from_public_internet config field to the provided IP address to indicate that stash has been accessed from this public IP without authentication.

func (*Instance) FinalizeSetup

func (i *Instance) FinalizeSetup()

func (*Instance) GetAPIKey

func (i *Instance) GetAPIKey() string

func (*Instance) GetAutostartVideo

func (i *Instance) GetAutostartVideo() bool

func (*Instance) GetAutostartVideoOnPlaySelected

func (i *Instance) GetAutostartVideoOnPlaySelected() bool

func (*Instance) GetBackupDirectoryPath added in v0.17.0

func (i *Instance) GetBackupDirectoryPath() string

func (*Instance) GetBackupDirectoryPathOrDefault added in v0.17.0

func (i *Instance) GetBackupDirectoryPathOrDefault() string

func (*Instance) GetCPUProfilePath

func (i *Instance) GetCPUProfilePath() string

GetCPUProfilePath returns the path to the CPU profile file to output profiling info to. This is set only via a commandline flag. Returns an empty string if not set.

func (*Instance) GetCSS

func (i *Instance) GetCSS() string

func (*Instance) GetCSSEnabled

func (i *Instance) GetCSSEnabled() bool

func (*Instance) GetCSSPath

func (i *Instance) GetCSSPath() string

func (*Instance) GetCachePath

func (i *Instance) GetCachePath() string

func (*Instance) GetConfigFile

func (i *Instance) GetConfigFile() string

GetConfigFile returns the full path to the used configuration file.

func (*Instance) GetConfigPath

func (i *Instance) GetConfigPath() string

GetConfigPath returns the path of the directory containing the used configuration file.

func (*Instance) GetContinuePlaylistDefault

func (i *Instance) GetContinuePlaylistDefault() bool

func (*Instance) GetCreateGalleriesFromFolders

func (i *Instance) GetCreateGalleriesFromFolders() bool

func (*Instance) GetCredentials

func (i *Instance) GetCredentials() (string, string)

func (*Instance) GetCustomLocales added in v0.17.0

func (i *Instance) GetCustomLocales() string

func (*Instance) GetCustomLocalesEnabled added in v0.17.0

func (i *Instance) GetCustomLocalesEnabled() bool

func (*Instance) GetCustomLocalesPath added in v0.17.0

func (i *Instance) GetCustomLocalesPath() string

func (*Instance) GetCustomPerformerImageLocation

func (i *Instance) GetCustomPerformerImageLocation() string

func (*Instance) GetCustomServedFolders

func (i *Instance) GetCustomServedFolders() URLMap

GetCustomServedFolders gets the map of custom paths to their applicable filesystem locations

func (*Instance) GetCustomUILocation

func (i *Instance) GetCustomUILocation() string

func (*Instance) GetDLNADefaultEnabled

func (i *Instance) GetDLNADefaultEnabled() bool

GetDLNADefaultEnabled returns true if the DLNA is enabled by default.

func (*Instance) GetDLNADefaultIPWhitelist

func (i *Instance) GetDLNADefaultIPWhitelist() []string

GetDLNADefaultIPWhitelist returns a list of IP addresses/wildcards that are allowed to use the DLNA service.

func (*Instance) GetDLNAInterfaces

func (i *Instance) GetDLNAInterfaces() []string

GetDLNAInterfaces returns a list of interface names to expose DLNA on. If empty, runs on all interfaces.

func (*Instance) GetDLNAServerName

func (i *Instance) GetDLNAServerName() string

GetDLNAServerName returns the visible name of the DLNA server. If empty, "stash" will be used.

func (*Instance) GetDangerousAllowPublicWithoutAuth

func (i *Instance) GetDangerousAllowPublicWithoutAuth() bool

GetDangerousAllowPublicWithoutAuth determines if the security feature is enabled. See https://github.com/stashapp/stash/wiki/Authentication-Required-When-Accessing-Stash-From-the-Internet

func (*Instance) GetDatabasePath

func (i *Instance) GetDatabasePath() string

func (*Instance) GetDefaultAutoTagSettings

func (i *Instance) GetDefaultAutoTagSettings() *AutoTagMetadataOptions

GetDefaultAutoTagSettings returns the default Scan task settings. Returns nil if the settings could not be unmarshalled, or if it has not been set.

func (*Instance) GetDefaultDatabaseFilePath

func (i *Instance) GetDefaultDatabaseFilePath() string

GetDefaultDatabaseFilePath returns the default database filename, which is located in the same directory as the config file.

func (*Instance) GetDefaultGenerateSettings

func (i *Instance) GetDefaultGenerateSettings() *models.GenerateMetadataOptions

GetDefaultGenerateSettings returns the default Scan task settings. Returns nil if the settings could not be unmarshalled, or if it has not been set.

func (*Instance) GetDefaultIdentifySettings

func (i *Instance) GetDefaultIdentifySettings() *identify.Options

GetDefaultIdentifySettings returns the default Identify task settings. Returns nil if the settings could not be unmarshalled, or if it has not been set.

func (*Instance) GetDefaultPluginsPath

func (i *Instance) GetDefaultPluginsPath() string

func (*Instance) GetDefaultScanSettings

func (i *Instance) GetDefaultScanSettings() *ScanMetadataOptions

GetDefaultScanSettings returns the default Scan task settings. Returns nil if the settings could not be unmarshalled, or if it has not been set.

func (*Instance) GetDefaultScrapersPath

func (i *Instance) GetDefaultScrapersPath() string

func (*Instance) GetDeleteFileDefault

func (i *Instance) GetDeleteFileDefault() bool

func (*Instance) GetDeleteGeneratedDefault

func (i *Instance) GetDeleteGeneratedDefault() bool

func (*Instance) GetDisableDropdownCreate

func (i *Instance) GetDisableDropdownCreate() *ConfigDisableDropdownCreate

func (*Instance) GetExcludes

func (i *Instance) GetExcludes() []string

func (*Instance) GetExternalHost

func (i *Instance) GetExternalHost() string

func (*Instance) GetFunscriptOffset

func (i *Instance) GetFunscriptOffset() int

func (*Instance) GetGalleryExtensions

func (i *Instance) GetGalleryExtensions() []string

func (*Instance) GetGeneratedPath

func (i *Instance) GetGeneratedPath() string

func (*Instance) GetHandyKey

func (i *Instance) GetHandyKey() string

func (*Instance) GetHost

func (i *Instance) GetHost() string

func (*Instance) GetImageExcludes

func (i *Instance) GetImageExcludes() []string

func (*Instance) GetImageExtensions

func (i *Instance) GetImageExtensions() []string

func (*Instance) GetImageLightboxOptions

func (i *Instance) GetImageLightboxOptions() ConfigImageLightboxResult

func (*Instance) GetJWTSignKey

func (i *Instance) GetJWTSignKey() []byte

func (*Instance) GetLanguage

func (i *Instance) GetLanguage() string

func (*Instance) GetLogAccess

func (i *Instance) GetLogAccess() bool

GetLogAccess returns true if http requests should be logged to the terminal. HTTP requests are not logged to the log file. Defaults to true.

func (*Instance) GetLogFile

func (i *Instance) GetLogFile() string

GetLogFile returns the filename of the file to output logs to. An empty string means that file logging will be disabled.

func (*Instance) GetLogLevel

func (i *Instance) GetLogLevel() string

GetLogLevel returns the lowest log level to write to the log. Should be one of "Debug", "Info", "Warning", "Error"

func (*Instance) GetLogOut

func (i *Instance) GetLogOut() bool

GetLogOut returns true if logging should be output to the terminal in addition to writing to a log file. Logging will be output to the terminal if file logging is disabled. Defaults to true.

func (*Instance) GetMaxSessionAge

func (i *Instance) GetMaxSessionAge() int

GetMaxSessionAge gets the maximum age for session cookies, in seconds. Session cookie expiry times are refreshed every request.

func (*Instance) GetMaxStreamingTranscodeSize

func (i *Instance) GetMaxStreamingTranscodeSize() models.StreamingResolutionEnum

func (*Instance) GetMaxTranscodeSize

func (i *Instance) GetMaxTranscodeSize() models.StreamingResolutionEnum

func (*Instance) GetMaxUploadSize

func (i *Instance) GetMaxUploadSize() int64

Max allowed graphql upload size in megabytes

func (*Instance) GetMaximumLoopDuration

func (i *Instance) GetMaximumLoopDuration() int

func (*Instance) GetMenuItems

func (i *Instance) GetMenuItems() []string

Interface options

func (*Instance) GetMetadataPath

func (i *Instance) GetMetadataPath() string

func (*Instance) GetNoBrowser

func (i *Instance) GetNoBrowser() bool

func (*Instance) GetNotificationsEnabled

func (i *Instance) GetNotificationsEnabled() bool

func (*Instance) GetParallelTasks

func (i *Instance) GetParallelTasks() int

GetParallelTasks returns the number of parallel tasks that should be started by scan or generate task.

func (*Instance) GetParallelTasksWithAutoDetection

func (i *Instance) GetParallelTasksWithAutoDetection() int

func (*Instance) GetPasswordHash

func (i *Instance) GetPasswordHash() string

func (*Instance) GetPluginsPath

func (i *Instance) GetPluginsPath() string

func (*Instance) GetPort

func (i *Instance) GetPort() int

func (*Instance) GetPreviewAudio

func (i *Instance) GetPreviewAudio() bool

func (*Instance) GetPreviewExcludeEnd

func (i *Instance) GetPreviewExcludeEnd() string

GetPreviewExcludeEnd returns the configuration setting string for excluding the end of scene videos for preview generation. A float value is interpreted as the amount of seconds to exclude from the end of the video when generating previews. If the value is suffixed with a '%' character, then it is interpreted as a proportion of the total video duration.

func (*Instance) GetPreviewExcludeStart

func (i *Instance) GetPreviewExcludeStart() string

GetPreviewExcludeStart returns the configuration setting string for excluding the start of scene videos for preview generation. This can be in two possible formats. A float value is interpreted as the amount of seconds to exclude from the start of the video before it is included in the preview. If the value is suffixed with a '%' character (for example '2%'), then it is interpreted as a proportion of the total video duration.

func (*Instance) GetPreviewPreset

func (i *Instance) GetPreviewPreset() models.PreviewPreset

GetPreviewPreset returns the preset when generating previews. Defaults to Slow.

func (*Instance) GetPreviewSegmentDuration

func (i *Instance) GetPreviewSegmentDuration() float64

GetPreviewSegmentDuration returns the duration of a single segment in a scene preview file, in seconds.

func (*Instance) GetPreviewSegments

func (i *Instance) GetPreviewSegments() int

GetPreviewSegments returns the amount of segments in a scene preview file.

func (*Instance) GetPythonPath

func (i *Instance) GetPythonPath() string

func (*Instance) GetScraperCDPPath

func (i *Instance) GetScraperCDPPath() string

GetScraperCDPPath gets the path to the Chrome executable or remote address to an instance of Chrome.

func (*Instance) GetScraperCertCheck

func (i *Instance) GetScraperCertCheck() bool

GetScraperCertCheck returns true if the scraper should check for insecure certificates when fetching an image or a page.

func (*Instance) GetScraperExcludeTagPatterns

func (i *Instance) GetScraperExcludeTagPatterns() []string

func (*Instance) GetScraperUserAgent

func (i *Instance) GetScraperUserAgent() string

func (*Instance) GetScrapersPath

func (i *Instance) GetScrapersPath() string

func (*Instance) GetSecurityTripwireAccessedFromPublicInternet

func (i *Instance) GetSecurityTripwireAccessedFromPublicInternet() string

GetSecurityTripwireAccessedFromPublicInternet returns a public IP address if stash has been accessed from the public internet, with no auth enabled, and DangerousAllowPublicWithoutAuth disabled. Returns an empty string otherwise.

func (*Instance) GetSessionStoreKey

func (i *Instance) GetSessionStoreKey() []byte

func (*Instance) GetShowOneTimeMovedNotification

func (i *Instance) GetShowOneTimeMovedNotification() bool

GetShowOneTimeMovedNotification shows whether a small notification to inform the user that Stash will no longer show a terminal window, and instead will be available in the tray, should be shown. It is true when an existing system is started after upgrading, and set to false forever after it is shown.

func (*Instance) GetShowScrubber

func (i *Instance) GetShowScrubber() bool

func (*Instance) GetShowStudioAsText

func (i *Instance) GetShowStudioAsText() bool

func (*Instance) GetSoundOnPreview

func (i *Instance) GetSoundOnPreview() bool

func (*Instance) GetStashBoxes

func (i *Instance) GetStashBoxes() []*models.StashBox

func (*Instance) GetStashPaths

func (i *Instance) GetStashPaths() []*StashConfig

GetStathPaths returns the configured stash library paths. Works opposite to the usual case - it will return the override value only if the main value is not set.

func (*Instance) GetTLSFiles

func (i *Instance) GetTLSFiles() (certFile, keyFile string)

func (*Instance) GetThemeColor

func (i *Instance) GetThemeColor() string

func (*Instance) GetUIConfiguration added in v0.16.0

func (i *Instance) GetUIConfiguration() map[string]interface{}

func (*Instance) GetUsername

func (i *Instance) GetUsername() string

func (*Instance) GetVideoExtensions

func (i *Instance) GetVideoExtensions() []string

func (*Instance) GetVideoFileNamingAlgorithm

func (i *Instance) GetVideoFileNamingAlgorithm() models.HashAlgorithm

GetVideoFileNamingAlgorithm returns what hash algorithm should be used for naming generated scene video files.

func (*Instance) GetWallPlayback

func (i *Instance) GetWallPlayback() string

func (*Instance) GetWallShowTitle

func (i *Instance) GetWallShowTitle() bool

func (*Instance) HasCredentials

func (i *Instance) HasCredentials() bool

func (*Instance) HasOverride

func (i *Instance) HasOverride(key string) bool

func (*Instance) HasTLSConfig

func (i *Instance) HasTLSConfig() bool

func (*Instance) InitTLS

func (i *Instance) InitTLS()

func (*Instance) IsCalculateMD5

func (i *Instance) IsCalculateMD5() bool

IsCalculateMD5 returns true if MD5 checksums should be generated for scene video files.

func (*Instance) IsNewSystem

func (i *Instance) IsNewSystem() bool

func (*Instance) IsWriteImageThumbnails

func (i *Instance) IsWriteImageThumbnails() bool

IsWriteImageThumbnails returns true if image thumbnails should be written to disk after generating on the fly.

func (*Instance) Set

func (i *Instance) Set(key string, value interface{})

func (*Instance) SetCSS

func (i *Instance) SetCSS(css string)

func (*Instance) SetConfigFile

func (i *Instance) SetConfigFile(fn string)

func (*Instance) SetCustomLocales added in v0.17.0

func (i *Instance) SetCustomLocales(customLocales string)

func (*Instance) SetDefault added in v0.17.0

func (i *Instance) SetDefault(key string, value interface{})

func (*Instance) SetInitialConfig

func (i *Instance) SetInitialConfig() error

SetInitialConfig fills in missing required config fields

func (*Instance) SetInitialMemoryConfig

func (i *Instance) SetInitialMemoryConfig() error

SetInitialMemoryConfig fills in missing required config fields without writing the configuration

func (*Instance) SetPassword

func (i *Instance) SetPassword(value string)

func (*Instance) SetUIConfiguration added in v0.16.0

func (i *Instance) SetUIConfiguration(v map[string]interface{})

func (*Instance) Validate

func (i *Instance) Validate() error

func (*Instance) ValidateCredentials

func (i *Instance) ValidateCredentials(username string, password string) bool

func (*Instance) ValidateStashBoxes

func (i *Instance) ValidateStashBoxes(boxes []*StashBoxInput) error

func (*Instance) Write

func (i *Instance) Write() error

type MissingConfigError

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

func (MissingConfigError) Error

func (e MissingConfigError) Error() string

type ScanMetadataOptions added in v0.17.0

type ScanMetadataOptions struct {
	// Set name, date, details from metadata (if present)
	// Deprecated: not implemented
	UseFileMetadata bool `json:"useFileMetadata"`
	// Strip file extension from title
	// Deprecated: not implemented
	StripFileExtension bool `json:"stripFileExtension"`
	// Generate previews during scan
	ScanGeneratePreviews bool `json:"scanGeneratePreviews"`
	// Generate image previews during scan
	ScanGenerateImagePreviews bool `json:"scanGenerateImagePreviews"`
	// Generate sprites during scan
	ScanGenerateSprites bool `json:"scanGenerateSprites"`
	// Generate phashes during scan
	ScanGeneratePhashes bool `json:"scanGeneratePhashes"`
	// Generate image thumbnails during scan
	ScanGenerateThumbnails bool `json:"scanGenerateThumbnails"`
}

type StashBoxError

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

StashBoxError represents configuration errors of Stash-Box

func (*StashBoxError) Error

func (s *StashBoxError) Error() string

type StashBoxInput added in v0.17.0

type StashBoxInput struct {
	Endpoint string `json:"endpoint"`
	APIKey   string `json:"api_key"`
	Name     string `json:"name"`
}

type StashConfig added in v0.17.0

type StashConfig struct {
	Path         string `json:"path"`
	ExcludeVideo bool   `json:"excludeVideo"`
	ExcludeImage bool   `json:"excludeImage"`
}

type StashConfigInput added in v0.17.0

type StashConfigInput struct {
	Path         string `json:"path"`
	ExcludeVideo bool   `json:"excludeVideo"`
	ExcludeImage bool   `json:"excludeImage"`
}

Stash configuration details

type URLMap

type URLMap map[string]string

func (URLMap) GetFilesystemLocation

func (m URLMap) GetFilesystemLocation(url string) (string, string)

GetFilesystemLocation returns the adjusted URL and the filesystem location

Jump to

Keyboard shortcuts

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