Documentation ¶
Index ¶
- Constants
- Variables
- func FileEnvSet() bool
- type AutoTagMetadataOptions
- type BlobsStorageType
- type Config
- func (i *Config) ActivatePublicAccessTripwire(requestIP string) error
- func (i *Config) FinalizeSetup()
- func (i *Config) GetAPIKey() string
- func (i *Config) GetAllPluginConfiguration() map[string]map[string]interface{}
- func (i *Config) GetAutostartVideo() bool
- func (i *Config) GetAutostartVideoOnPlaySelected() bool
- func (i *Config) GetBackupDirectoryPath() string
- func (i *Config) GetBackupDirectoryPathOrDefault() string
- func (i *Config) GetBlobsPath() string
- func (i *Config) GetBlobsStorage() BlobsStorageType
- func (i *Config) GetCSS() string
- func (i *Config) GetCSSEnabled() bool
- func (i *Config) GetCSSPath() string
- func (i *Config) GetCachePath() string
- func (i *Config) GetConfigFile() string
- func (i *Config) GetConfigPath() string
- func (i *Config) GetConfigPathAbs() string
- func (i *Config) GetContinuePlaylistDefault() bool
- func (i *Config) GetCreateGalleriesFromFolders() bool
- func (i *Config) GetCredentials() (string, string)
- func (i *Config) GetCustomLocales() string
- func (i *Config) GetCustomLocalesEnabled() bool
- func (i *Config) GetCustomLocalesPath() string
- func (i *Config) GetCustomPerformerImageLocation() string
- func (i *Config) GetCustomServedFolders() utils.URLMap
- func (i *Config) GetDLNADefaultEnabled() bool
- func (i *Config) GetDLNADefaultIPWhitelist() []string
- func (i *Config) GetDLNAInterfaces() []string
- func (i *Config) GetDLNAPort() int
- func (i *Config) GetDLNAPortAsString() string
- func (i *Config) GetDLNAServerName() string
- func (i *Config) GetDangerousAllowPublicWithoutAuth() bool
- func (i *Config) GetDatabasePath() string
- func (i *Config) GetDefaultAutoTagSettings() *AutoTagMetadataOptions
- func (i *Config) GetDefaultDatabaseFilePath() string
- func (i *Config) GetDefaultGenerateSettings() *models.GenerateMetadataOptions
- func (i *Config) GetDefaultIdentifySettings() *identify.Options
- func (i *Config) GetDefaultPluginsPath() string
- func (i *Config) GetDefaultScanSettings() *ScanMetadataOptions
- func (i *Config) GetDefaultScrapersPath() string
- func (i *Config) GetDeleteFileDefault() bool
- func (i *Config) GetDeleteGeneratedDefault() bool
- func (i *Config) GetDisableDropdownCreate() *ConfigDisableDropdownCreate
- func (i *Config) GetDisabledPlugins() []string
- func (i *Config) GetDrawFunscriptHeatmapRange() bool
- func (i *Config) GetExcludes() []string
- func (i *Config) GetExternalHost() string
- func (i *Config) GetExtraBlobsPaths() []string
- func (i *Config) GetFFMpegPath() string
- func (i *Config) GetFFProbePath() string
- func (i *Config) GetFunscriptOffset() int
- func (i *Config) GetGalleryCoverRegex() string
- func (i *Config) GetGalleryExtensions() []string
- func (i *Config) GetGeneratedPath() string
- func (i *Config) GetHandyKey() string
- func (i *Config) GetHost() string
- func (i *Config) GetImageExcludes() []string
- func (i *Config) GetImageExtensions() []string
- func (i *Config) GetImageLightboxOptions() ConfigImageLightboxResult
- func (i *Config) GetJWTSignKey() []byte
- func (i *Config) GetJavascript() string
- func (i *Config) GetJavascriptEnabled() bool
- func (i *Config) GetJavascriptPath() string
- func (i *Config) GetLanguage() string
- func (i *Config) GetLiveTranscodeInputArgs() []string
- func (i *Config) GetLiveTranscodeOutputArgs() []string
- func (i *Config) GetLogAccess() bool
- func (i *Config) GetLogFile() string
- func (i *Config) GetLogLevel() string
- func (i *Config) GetLogOut() bool
- func (i *Config) GetMaxSessionAge() int
- func (i *Config) GetMaxStreamingTranscodeSize() models.StreamingResolutionEnum
- func (i *Config) GetMaxTranscodeSize() models.StreamingResolutionEnum
- func (i *Config) GetMaxUploadSize() int64
- func (i *Config) GetMaximumLoopDuration() int
- func (i *Config) GetMenuItems() []string
- func (i *Config) GetMetadataPath() string
- func (i *Config) GetNoBrowser() bool
- func (i *Config) GetNoProxy() string
- func (i *Config) GetNotificationsEnabled() bool
- func (i *Config) GetParallelTasks() int
- func (i *Config) GetParallelTasksWithAutoDetection() int
- func (i *Config) GetPasswordHash() string
- func (i *Config) GetPluginConfiguration(pluginID string) map[string]interface{}
- func (i *Config) GetPluginPackagePathGetter() packagePathGetter
- func (i *Config) GetPluginPackageSources() []*models.PackageSource
- func (i *Config) GetPluginsPath() string
- func (i *Config) GetPort() int
- func (i *Config) GetPreviewAudio() bool
- func (i *Config) GetPreviewExcludeEnd() string
- func (i *Config) GetPreviewExcludeStart() string
- func (i *Config) GetPreviewPreset() models.PreviewPreset
- func (i *Config) GetPreviewSegmentDuration() float64
- func (i *Config) GetPreviewSegments() int
- func (i *Config) GetProxy() string
- func (i *Config) GetPythonPath() string
- func (i *Config) GetScraperCDPPath() string
- func (i *Config) GetScraperCertCheck() bool
- func (i *Config) GetScraperExcludeTagPatterns() []string
- func (i *Config) GetScraperPackagePathGetter() packagePathGetter
- func (i *Config) GetScraperPackageSources() []*models.PackageSource
- func (i *Config) GetScraperUserAgent() string
- func (i *Config) GetScrapersPath() string
- func (i *Config) GetSecurityTripwireAccessedFromPublicInternet() string
- func (i *Config) GetSequentialScanning() bool
- func (i *Config) GetSessionStoreKey() []byte
- func (i *Config) GetShowOneTimeMovedNotification() bool
- func (i *Config) GetShowScrubber() bool
- func (i *Config) GetShowStudioAsText() bool
- func (i *Config) GetSoundOnPreview() bool
- func (i *Config) GetStashBoxes() []*models.StashBox
- func (i *Config) GetStashPaths() StashConfigs
- func (i *Config) GetTLSFiles() (certFile, keyFile string)
- func (i *Config) GetThemeColor() string
- func (i *Config) GetTranscodeHardwareAcceleration() bool
- func (i *Config) GetTranscodeInputArgs() []string
- func (i *Config) GetTranscodeOutputArgs() []string
- func (i *Config) GetUIConfiguration() map[string]interface{}
- func (i *Config) GetUILocation() string
- func (i *Config) GetUseStashHostedFunscript() bool
- func (i *Config) GetUsername() string
- func (i *Config) GetVideoExtensions() []string
- func (i *Config) GetVideoFileNamingAlgorithm() models.HashAlgorithm
- func (i *Config) GetVideoSortOrder() string
- func (i *Config) GetWallPlayback() string
- func (i *Config) GetWallShowTitle() bool
- func (i *Config) HasCredentials() bool
- func (i *Config) HasOverride(key string) bool
- func (i *Config) HasTLSConfig() bool
- func (i *Config) InitTLS()
- func (i *Config) IsCalculateMD5() bool
- func (i *Config) IsCreateImageClipsFromVideos() bool
- func (i *Config) IsNewSystem() bool
- func (i *Config) IsWriteImageThumbnails() bool
- func (i *Config) Marshal() ([]byte, error)
- func (i *Config) SetBool(key string, value bool)
- func (i *Config) SetCSS(css string)
- func (i *Config) SetConfigFile(fn string)
- func (i *Config) SetCustomLocales(customLocales string)
- func (i *Config) SetDefault(key string, value interface{})
- func (i *Config) SetFloat(key string, value float64)
- func (i *Config) SetInitialConfig() error
- func (i *Config) SetInt(key string, value int)
- func (i *Config) SetInterface(key string, value interface{})
- func (i *Config) SetJavascript(javascript string)
- func (i *Config) SetPassword(value string)
- func (i *Config) SetPluginConfiguration(pluginID string, v map[string]interface{})
- func (i *Config) SetString(key string, value string)
- func (i *Config) SetUIConfiguration(v map[string]interface{})
- func (i *Config) Validate() error
- func (i *Config) ValidateCredentials(username string, password string) bool
- func (i *Config) ValidateStashBoxes(boxes []*StashBoxInput) error
- func (i *Config) Write() error
- type ConfigDisableDropdownCreate
- type ConfigImageLightboxResult
- type ImageLightboxDisplayMode
- type ImageLightboxScrollMode
- type MissingConfigError
- type ScanMetadataOptions
- type StashBoxError
- type StashBoxInput
- type StashConfig
- type StashConfigInput
- type StashConfigs
Constants ¶
const ( Stash = "stash" Cache = "cache" BackupDirectoryPath = "backup_directory_path" Generated = "generated" Metadata = "metadata" BlobsPath = "blobs_path" Downloads = "downloads" ApiKey = "api_key" Username = "username" Password = "password" MaxSessionAge = "max_session_age" FFMpegPath = "ffmpeg_path" FFProbePath = "ffprobe_path" BlobsStorage = "blobs_storage" 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" // ffmpeg extra args options TranscodeInputArgs = "ffmpeg.transcode.input_args" TranscodeOutputArgs = "ffmpeg.transcode.output_args" LiveTranscodeInputArgs = "ffmpeg.live_transcode.input_args" LiveTranscodeOutputArgs = "ffmpeg.live_transcode.output_args" ParallelTasks = "parallel_tasks" PreviewPreset = "preview_preset" TranscodeHardwareAcceleration = "ffmpeg.hardware_acceleration" SequentialScanning = "sequential_scanning" SequentialScanningDefault = false PreviewAudio = "preview_audio" PreviewSegmentDuration = "preview_segment_duration" PreviewSegments = "preview_segments" PreviewExcludeStart = "preview_exclude_start" PreviewExcludeEnd = "preview_exclude_end" WriteImageThumbnails = "write_image_thumbnails" CreateImageClipsFromVideos = "create_image_clip_from_videos" Host = "host" Port = "port" ExternalHost = "external_host" // http proxy url if required Proxy = "proxy" // urls or IPs that should not use the proxy NoProxy = "no_proxy" // 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" PluginsSetting = "plugins.settings" PluginsSettingPrefix = PluginsSetting + "." DisabledPlugins = "plugins.disabled" PluginPackageSources = "plugins.package_sources" ScraperPackageSources = "scrapers.package_sources" // 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. UILocation = "ui_location" // backwards compatible name LegacyCustomUILocation = "custom_ui_location" // Gallery Cover Regex GalleryCoverRegex = "gallery_cover_regex" // 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" JavascriptEnabled = "javascriptenabled" CustomLocalesEnabled = "customlocalesenabled" ShowScrubber = "show_scrubber" WallPlayback = "wall_playback" ImageLightboxSlideshowDelay = "image_lightbox.slideshow_delay" ImageLightboxDisplayModeKey = "image_lightbox.display_mode" ImageLightboxScaleUp = "image_lightbox.scale_up" 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" DisableDropdownCreateMovie = "disable_dropdown_create.movie" HandyKey = "handy_key" FunscriptOffset = "funscript_offset" UseStashHostedFunscript = "use_stash_hosted_funscript" DrawFunscriptHeatmapRange = "draw_funscript_heatmap_range" 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" DLNAVideoSortOrder = "dlna.video_sort_order" DLNAPort = "dlna.port" DLNAPortDefault = 1338 // 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" // Developer options ExtraBlobsPaths = "developer_options.extra_blob_paths" )
Variables ¶
var AllBlobStorageType = []BlobsStorageType{ BlobStorageTypeDatabase, BlobStorageTypeFilesystem, }
var AllImageLightboxDisplayMode = []ImageLightboxDisplayMode{ ImageLightboxDisplayModeOriginal, ImageLightboxDisplayModeFitXy, ImageLightboxDisplayModeFitX, }
var AllImageLightboxScrollMode = []ImageLightboxScrollMode{ ImageLightboxScrollModeZoom, ImageLightboxScrollModePanY, }
Functions ¶
func FileEnvSet ¶
func FileEnvSet() bool
FileEnvSet returns true if the configuration file environment parameter is set.
Types ¶
type AutoTagMetadataOptions ¶ added in v0.17.0
type BlobsStorageType ¶ added in v0.20.0
type BlobsStorageType string
const ( // Database BlobStorageTypeDatabase BlobsStorageType = "DATABASE" // Filesystem BlobStorageTypeFilesystem BlobsStorageType = "FILESYSTEM" )
func (BlobsStorageType) IsValid ¶ added in v0.20.0
func (e BlobsStorageType) IsValid() bool
func (BlobsStorageType) MarshalGQL ¶ added in v0.20.0
func (e BlobsStorageType) MarshalGQL(w io.Writer)
func (BlobsStorageType) String ¶ added in v0.20.0
func (e BlobsStorageType) String() string
func (*BlobsStorageType) UnmarshalGQL ¶ added in v0.20.0
func (e *BlobsStorageType) UnmarshalGQL(v interface{}) error
type Config ¶ added in v0.24.0
func GetInstance ¶
func GetInstance() *Config
func InitializeEmpty ¶ added in v0.24.0
func InitializeEmpty() *Config
Called by tests to initialize an empty config
func (*Config) ActivatePublicAccessTripwire ¶ added in v0.24.0
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 (*Config) FinalizeSetup ¶ added in v0.24.0
func (i *Config) FinalizeSetup()
func (*Config) GetAllPluginConfiguration ¶ added in v0.24.0
func (*Config) GetAutostartVideo ¶ added in v0.24.0
func (*Config) GetAutostartVideoOnPlaySelected ¶ added in v0.24.0
func (*Config) GetBackupDirectoryPath ¶ added in v0.24.0
func (*Config) GetBackupDirectoryPathOrDefault ¶ added in v0.24.0
func (*Config) GetBlobsPath ¶ added in v0.24.0
func (*Config) GetBlobsStorage ¶ added in v0.24.0
func (i *Config) GetBlobsStorage() BlobsStorageType
func (*Config) GetCSSEnabled ¶ added in v0.24.0
func (*Config) GetCSSPath ¶ added in v0.24.0
func (*Config) GetCachePath ¶ added in v0.24.0
func (*Config) GetConfigFile ¶ added in v0.24.0
GetConfigFile returns the full path to the used configuration file.
func (*Config) GetConfigPath ¶ added in v0.24.0
GetConfigPath returns the path of the directory containing the used configuration file.
func (*Config) GetConfigPathAbs ¶ added in v0.26.0
GetConfigPathAbs returns the path of the directory containing the used configuration file, resolved to an absolute path. Returns the return value of GetConfigPath if the path cannot be made into an absolute path.
func (*Config) GetContinuePlaylistDefault ¶ added in v0.24.0
func (*Config) GetCreateGalleriesFromFolders ¶ added in v0.24.0
func (*Config) GetCredentials ¶ added in v0.24.0
func (*Config) GetCustomLocales ¶ added in v0.24.0
func (*Config) GetCustomLocalesEnabled ¶ added in v0.24.0
func (*Config) GetCustomLocalesPath ¶ added in v0.24.0
func (*Config) GetCustomPerformerImageLocation ¶ added in v0.24.0
func (*Config) GetCustomServedFolders ¶ added in v0.24.0
GetCustomServedFolders gets the map of custom paths to their applicable filesystem locations
func (*Config) GetDLNADefaultEnabled ¶ added in v0.24.0
GetDLNADefaultEnabled returns true if the DLNA is enabled by default.
func (*Config) GetDLNADefaultIPWhitelist ¶ added in v0.24.0
GetDLNADefaultIPWhitelist returns a list of IP addresses/wildcards that are allowed to use the DLNA service.
func (*Config) GetDLNAInterfaces ¶ added in v0.24.0
GetDLNAInterfaces returns a list of interface names to expose DLNA on. If empty, runs on all interfaces.
func (*Config) GetDLNAPort ¶ added in v0.26.0
GetDLNAPort returns the port to run the DLNA server on. If empty, 1338 will be used.
func (*Config) GetDLNAPortAsString ¶ added in v0.26.0
GetDLNAPortAsString returns the port to run the DLNA server on as a string.
func (*Config) GetDLNAServerName ¶ added in v0.24.0
GetDLNAServerName returns the visible name of the DLNA server. If empty, "stash" will be used.
func (*Config) GetDangerousAllowPublicWithoutAuth ¶ added in v0.24.0
GetDangerousAllowPublicWithoutAuth determines if the security feature is enabled. See https://docs.stashapp.cc/networking/authentication-required-when-accessing-stash-from-the-internet
func (*Config) GetDatabasePath ¶ added in v0.24.0
func (*Config) GetDefaultAutoTagSettings ¶ added in v0.24.0
func (i *Config) 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 (*Config) GetDefaultDatabaseFilePath ¶ added in v0.24.0
GetDefaultDatabaseFilePath returns the default database filename, which is located in the same directory as the config file.
func (*Config) GetDefaultGenerateSettings ¶ added in v0.24.0
func (i *Config) 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 (*Config) GetDefaultIdentifySettings ¶ added in v0.24.0
GetDefaultIdentifySettings returns the default Identify task settings. Returns nil if the settings could not be unmarshalled, or if it has not been set.
func (*Config) GetDefaultPluginsPath ¶ added in v0.24.0
func (*Config) GetDefaultScanSettings ¶ added in v0.24.0
func (i *Config) 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 (*Config) GetDefaultScrapersPath ¶ added in v0.24.0
func (*Config) GetDeleteFileDefault ¶ added in v0.24.0
func (*Config) GetDeleteGeneratedDefault ¶ added in v0.24.0
func (*Config) GetDisableDropdownCreate ¶ added in v0.24.0
func (i *Config) GetDisableDropdownCreate() *ConfigDisableDropdownCreate
func (*Config) GetDisabledPlugins ¶ added in v0.24.0
func (*Config) GetDrawFunscriptHeatmapRange ¶ added in v0.24.0
func (*Config) GetExcludes ¶ added in v0.24.0
func (*Config) GetExternalHost ¶ added in v0.24.0
func (*Config) GetExtraBlobsPaths ¶ added in v0.25.0
GetExtraBlobsPaths returns extra blobs paths. For developer/advanced use only.
func (*Config) GetFFMpegPath ¶ added in v0.26.0
GetFFMpegPath returns the path to the FFMpeg executable. If empty, stash will attempt to resolve it from the path.
func (*Config) GetFFProbePath ¶ added in v0.26.0
GetFFProbePath returns the path to the FFProbe executable. If empty, stash will attempt to resolve it from the path.
func (*Config) GetFunscriptOffset ¶ added in v0.24.0
func (*Config) GetGalleryCoverRegex ¶ added in v0.24.0
func (*Config) GetGalleryExtensions ¶ added in v0.24.0
func (*Config) GetGeneratedPath ¶ added in v0.24.0
func (*Config) GetHandyKey ¶ added in v0.24.0
func (*Config) GetImageExcludes ¶ added in v0.24.0
func (*Config) GetImageExtensions ¶ added in v0.24.0
func (*Config) GetImageLightboxOptions ¶ added in v0.24.0
func (i *Config) GetImageLightboxOptions() ConfigImageLightboxResult
func (*Config) GetJWTSignKey ¶ added in v0.24.0
func (*Config) GetJavascript ¶ added in v0.24.0
func (*Config) GetJavascriptEnabled ¶ added in v0.24.0
func (*Config) GetJavascriptPath ¶ added in v0.24.0
func (*Config) GetLanguage ¶ added in v0.24.0
func (*Config) GetLiveTranscodeInputArgs ¶ added in v0.24.0
func (*Config) GetLiveTranscodeOutputArgs ¶ added in v0.24.0
func (*Config) GetLogAccess ¶ added in v0.24.0
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 (*Config) GetLogFile ¶ added in v0.24.0
GetLogFile returns the filename of the file to output logs to. An empty string means that file logging will be disabled.
func (*Config) GetLogLevel ¶ added in v0.24.0
GetLogLevel returns the lowest log level to write to the log. Should be one of "Debug", "Info", "Warning", "Error"
func (*Config) GetLogOut ¶ added in v0.24.0
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 (*Config) GetMaxSessionAge ¶ added in v0.24.0
GetMaxSessionAge gets the maximum age for session cookies, in seconds. Session cookie expiry times are refreshed every request.
func (*Config) GetMaxStreamingTranscodeSize ¶ added in v0.24.0
func (i *Config) GetMaxStreamingTranscodeSize() models.StreamingResolutionEnum
func (*Config) GetMaxTranscodeSize ¶ added in v0.24.0
func (i *Config) GetMaxTranscodeSize() models.StreamingResolutionEnum
func (*Config) GetMaxUploadSize ¶ added in v0.24.0
Max allowed graphql upload size in megabytes
func (*Config) GetMaximumLoopDuration ¶ added in v0.24.0
func (*Config) GetMenuItems ¶ added in v0.24.0
Interface options
func (*Config) GetMetadataPath ¶ added in v0.24.0
func (*Config) GetNoBrowser ¶ added in v0.24.0
func (*Config) GetNoProxy ¶ added in v0.24.0
GetProxy returns the url of a http proxy to be used for all outgoing http calls.
func (*Config) GetNotificationsEnabled ¶ added in v0.24.0
func (*Config) GetParallelTasks ¶ added in v0.24.0
GetParallelTasks returns the number of parallel tasks that should be started by scan or generate task.
func (*Config) GetParallelTasksWithAutoDetection ¶ added in v0.24.0
func (*Config) GetPasswordHash ¶ added in v0.24.0
func (*Config) GetPluginConfiguration ¶ added in v0.24.0
func (*Config) GetPluginPackagePathGetter ¶ added in v0.24.0
func (i *Config) GetPluginPackagePathGetter() packagePathGetter
func (*Config) GetPluginPackageSources ¶ added in v0.24.0
func (i *Config) GetPluginPackageSources() []*models.PackageSource
func (*Config) GetPluginsPath ¶ added in v0.24.0
func (*Config) GetPreviewAudio ¶ added in v0.24.0
func (*Config) GetPreviewExcludeEnd ¶ added in v0.24.0
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 (*Config) GetPreviewExcludeStart ¶ added in v0.24.0
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 (*Config) GetPreviewPreset ¶ added in v0.24.0
func (i *Config) GetPreviewPreset() models.PreviewPreset
GetPreviewPreset returns the preset when generating previews. Defaults to Slow.
func (*Config) GetPreviewSegmentDuration ¶ added in v0.24.0
GetPreviewSegmentDuration returns the duration of a single segment in a scene preview file, in seconds.
func (*Config) GetPreviewSegments ¶ added in v0.24.0
GetPreviewSegments returns the amount of segments in a scene preview file.
func (*Config) GetProxy ¶ added in v0.24.0
GetProxy returns the url of a http proxy to be used for all outgoing http calls.
func (*Config) GetPythonPath ¶ added in v0.24.0
func (*Config) GetScraperCDPPath ¶ added in v0.24.0
GetScraperCDPPath gets the path to the Chrome executable or remote address to an instance of Chrome.
func (*Config) GetScraperCertCheck ¶ added in v0.24.0
GetScraperCertCheck returns true if the scraper should check for insecure certificates when fetching an image or a page.
func (*Config) GetScraperExcludeTagPatterns ¶ added in v0.24.0
func (*Config) GetScraperPackagePathGetter ¶ added in v0.24.0
func (i *Config) GetScraperPackagePathGetter() packagePathGetter
func (*Config) GetScraperPackageSources ¶ added in v0.24.0
func (i *Config) GetScraperPackageSources() []*models.PackageSource
func (*Config) GetScraperUserAgent ¶ added in v0.24.0
func (*Config) GetScrapersPath ¶ added in v0.24.0
func (*Config) GetSecurityTripwireAccessedFromPublicInternet ¶ added in v0.24.0
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 (*Config) GetSequentialScanning ¶ added in v0.24.0
func (*Config) GetSessionStoreKey ¶ added in v0.24.0
func (*Config) GetShowOneTimeMovedNotification ¶ added in v0.24.0
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 (*Config) GetShowScrubber ¶ added in v0.24.0
func (*Config) GetShowStudioAsText ¶ added in v0.24.0
func (*Config) GetSoundOnPreview ¶ added in v0.24.0
func (*Config) GetStashBoxes ¶ added in v0.24.0
func (*Config) GetStashPaths ¶ added in v0.24.0
func (i *Config) GetStashPaths() StashConfigs
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 (*Config) GetTLSFiles ¶ added in v0.24.0
func (*Config) GetThemeColor ¶ added in v0.24.0
func (*Config) GetTranscodeHardwareAcceleration ¶ added in v0.24.0
func (*Config) GetTranscodeInputArgs ¶ added in v0.24.0
func (*Config) GetTranscodeOutputArgs ¶ added in v0.24.0
func (*Config) GetUIConfiguration ¶ added in v0.24.0
func (*Config) GetUILocation ¶ added in v0.26.0
func (*Config) GetUseStashHostedFunscript ¶ added in v0.24.0
func (*Config) GetUsername ¶ added in v0.24.0
func (*Config) GetVideoExtensions ¶ added in v0.24.0
func (*Config) GetVideoFileNamingAlgorithm ¶ added in v0.24.0
func (i *Config) GetVideoFileNamingAlgorithm() models.HashAlgorithm
GetVideoFileNamingAlgorithm returns what hash algorithm should be used for naming generated scene video files.
func (*Config) GetVideoSortOrder ¶ added in v0.24.0
GetVideoSortOrder returns the sort order to display videos. If empty, videos will be sorted by titles.
func (*Config) GetWallPlayback ¶ added in v0.24.0
func (*Config) GetWallShowTitle ¶ added in v0.24.0
func (*Config) HasCredentials ¶ added in v0.24.0
func (*Config) HasOverride ¶ added in v0.24.0
func (*Config) HasTLSConfig ¶ added in v0.24.0
func (*Config) IsCalculateMD5 ¶ added in v0.24.0
IsCalculateMD5 returns true if MD5 checksums should be generated for scene video files.
func (*Config) IsCreateImageClipsFromVideos ¶ added in v0.24.0
func (*Config) IsNewSystem ¶ added in v0.24.0
func (*Config) IsWriteImageThumbnails ¶ added in v0.24.0
IsWriteImageThumbnails returns true if image thumbnails should be written to disk after generating on the fly.
func (*Config) SetBool ¶ added in v0.26.0
these methods are intended to ensure type safety (ie no primitive pointers)
func (*Config) SetConfigFile ¶ added in v0.24.0
func (*Config) SetCustomLocales ¶ added in v0.24.0
func (*Config) SetDefault ¶ added in v0.24.0
func (*Config) SetInitialConfig ¶ added in v0.24.0
SetInitialConfig fills in missing required config fields. The config file will not be written.
func (*Config) SetInterface ¶ added in v0.26.0
func (*Config) SetJavascript ¶ added in v0.24.0
func (*Config) SetPassword ¶ added in v0.24.0
func (*Config) SetPluginConfiguration ¶ added in v0.24.0
SetPluginConfiguration sets the configuration for a plugin. It will overwrite any existing configuration.
func (*Config) SetUIConfiguration ¶ added in v0.24.0
func (*Config) ValidateCredentials ¶ added in v0.24.0
func (*Config) ValidateStashBoxes ¶ added in v0.24.0
func (i *Config) ValidateStashBoxes(boxes []*StashBoxInput) error
type ConfigDisableDropdownCreate ¶ added in v0.17.0
type ConfigImageLightboxResult ¶ added in v0.17.0
type ConfigImageLightboxResult struct { SlideshowDelay *int `json:"slideshowDelay"` DisplayMode *ImageLightboxDisplayMode `json:"displayMode"` ScaleUp *bool `json:"scaleUp"` 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 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 { // Forces a rescan on files even if they have not changed Rescan bool `json:"rescan"` // Generate scene covers during scan ScanGenerateCovers bool `json:"scanGenerateCovers"` // 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"` // Generate image thumbnails during scan ScanGenerateClipPreviews bool `json:"scanGenerateClipPreviews"` }
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 StashConfig ¶ added in v0.17.0
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 StashConfigs ¶ added in v0.20.0
type StashConfigs []*StashConfig
func (StashConfigs) GetStashFromDirPath ¶ added in v0.20.0
func (s StashConfigs) GetStashFromDirPath(dirPath string) *StashConfig
func (StashConfigs) GetStashFromPath ¶ added in v0.20.0
func (s StashConfigs) GetStashFromPath(path string) *StashConfig