Documentation ¶
Index ¶
- Constants
- func HasTLSConfig() bool
- type Instance
- func (i *Instance) FinalizeSetup()
- func (i *Instance) GetAPIKey() string
- func (i *Instance) GetAutostartVideo() bool
- func (i *Instance) GetCPUProfilePath() string
- func (i *Instance) GetCSS() string
- func (i *Instance) GetCSSEnabled() bool
- func (i *Instance) GetCSSPath() string
- func (i *Instance) GetCachePath() string
- func (i *Instance) GetConfigFile() string
- func (i *Instance) GetConfigFilePath() string
- func (i *Instance) GetConfigPath() string
- func (i *Instance) GetCreateGalleriesFromFolders() bool
- func (i *Instance) GetCredentials() (string, string)
- func (i *Instance) GetCustomServedFolders() URLMap
- func (i *Instance) GetCustomUILocation() string
- func (i *Instance) GetDLNADefaultEnabled() bool
- func (i *Instance) GetDLNADefaultIPWhitelist() []string
- func (i *Instance) GetDLNAInterfaces() []string
- func (i *Instance) GetDLNAServerName() string
- func (i *Instance) GetDatabasePath() string
- func (i *Instance) GetDefaultDatabaseFilePath() string
- func (i *Instance) GetDefaultPluginsPath() string
- func (i *Instance) GetDefaultScrapersPath() string
- func (i *Instance) GetExcludes() []string
- func (i *Instance) GetExternalHost() string
- func (i *Instance) GetGalleryExtensions() []string
- func (i *Instance) GetGeneratedPath() string
- func (i *Instance) GetHandyKey() string
- func (i *Instance) GetHost() string
- func (i *Instance) GetImageExcludes() []string
- func (i *Instance) GetImageExtensions() []string
- func (i *Instance) GetJWTSignKey() []byte
- func (i *Instance) GetLanguage() string
- func (i *Instance) GetLogAccess() bool
- func (i *Instance) GetLogFile() string
- func (i *Instance) GetLogLevel() string
- func (i *Instance) GetLogOut() bool
- func (i *Instance) GetMaxSessionAge() int
- func (i *Instance) GetMaxStreamingTranscodeSize() models.StreamingResolutionEnum
- func (i *Instance) GetMaxTranscodeSize() models.StreamingResolutionEnum
- func (i *Instance) GetMaxUploadSize() int64
- func (i *Instance) GetMaximumLoopDuration() int
- func (i *Instance) GetMenuItems() []string
- func (i *Instance) GetMetadataPath() string
- func (i *Instance) GetParallelTasks() int
- func (i *Instance) GetParallelTasksWithAutoDetection() int
- func (i *Instance) GetPasswordHash() string
- func (i *Instance) GetPluginsPath() string
- func (i *Instance) GetPort() int
- func (i *Instance) GetPreviewAudio() bool
- func (i *Instance) GetPreviewExcludeEnd() string
- func (i *Instance) GetPreviewExcludeStart() string
- func (i *Instance) GetPreviewPreset() models.PreviewPreset
- func (i *Instance) GetPreviewSegmentDuration() float64
- func (i *Instance) GetPreviewSegments() int
- func (i *Instance) GetScraperCDPPath() string
- func (i *Instance) GetScraperCertCheck() bool
- func (i *Instance) GetScraperUserAgent() string
- func (i *Instance) GetScrapersPath() string
- func (i *Instance) GetSessionStoreKey() []byte
- func (i *Instance) GetShowStudioAsText() bool
- func (i *Instance) GetSlideshowDelay() int
- func (i *Instance) GetSoundOnPreview() bool
- func (i *Instance) GetStashBoxes() []*models.StashBox
- func (i *Instance) GetStashPaths() []*models.StashConfig
- func (i *Instance) GetUsername() string
- func (i *Instance) GetVideoExtensions() []string
- func (i *Instance) GetVideoFileNamingAlgorithm() models.HashAlgorithm
- func (i *Instance) GetWallPlayback() string
- func (i *Instance) GetWallShowTitle() bool
- func (i *Instance) HasCredentials() bool
- func (i *Instance) IsCalculateMD5() bool
- func (i *Instance) IsNewSystem() bool
- func (i *Instance) Set(key string, value interface{})
- func (i *Instance) SetCSS(css string)
- func (i *Instance) SetConfigFile(fn string)
- func (i *Instance) SetInitialConfig() error
- func (i *Instance) SetPassword(value string)
- func (i *Instance) Validate() error
- func (i *Instance) ValidateCredentials(username string, password string) bool
- func (i *Instance) ValidateStashBoxes(boxes []*models.StashBoxInput) error
- func (i *Instance) Write() error
- type MissingConfigError
- type URLMap
Constants ¶
const ApiKey = "api_key"
const AutostartVideo = "autostart_video"
const CSSEnabled = "cssEnabled"
const Cache = "cache"
const CalculateMD5 = "calculate_md5"
CalculateMD5 is the config key used to determine if MD5 should be calculated for video files.
const CreateGalleriesFromFolders = "create_galleries_from_folders"
const CustomServedFolders = "custom_served_folders"
served directories this should be manually configured only
const CustomUILocation = "custom_ui_location"
UI directory. Overrides to serve the UI from a specific location rather than use the embedded UI.
const DLNADefaultEnabled = "dlna.default_enabled"
const DLNADefaultIPWhitelist = "dlna.default_whitelist"
const DLNAInterfaces = "dlna.interfaces"
const DLNAServerName = "dlna.server_name"
DLNA options
const Database = "database"
const DefaultMaxSessionAge = 60 * 60 * 1 // 1 hours
const Downloads = "downloads"
const Exclude = "exclude"
const ExternalHost = "external_host"
const GalleryExtensions = "gallery_extensions"
const Generated = "generated"
const HandyKey = "handy_key"
const Host = "host"
const ImageExclude = "image_exclude"
const ImageExtensions = "image_extensions"
const JWTSignKey = "jwt_secret_key"
key used to sign JWT tokens
const Language = "language"
i18n
const LogAccess = "logAccess"
const LogFile = "logFile"
Logging options
const LogLevel = "logLevel"
const LogOut = "logOut"
const MaxSessionAge = "max_session_age"
const MaxStreamingTranscodeSize = "max_streaming_transcode_size"
const MaxTranscodeSize = "max_transcode_size"
const MaxUploadSize = "max_upload_size"
File upload options
const MaximumLoopDuration = "maximum_loop_duration"
const MenuItems = "menu_items"
Interface options
const Metadata = "metadata"
const ParallelTasks = "parallel_tasks"
const Password = "password"
const PluginsPath = "plugins_path"
plugin options
const Port = "port"
const PreviewAudio = "preview_audio"
const PreviewExcludeEnd = "preview_exclude_end"
const PreviewExcludeStart = "preview_exclude_start"
const PreviewPreset = "preview_preset"
const PreviewSegmentDuration = "preview_segment_duration"
const PreviewSegments = "preview_segments"
const ScraperCDPPath = "scraper_cdp_path"
const ScraperCertCheck = "scraper_cert_check"
const ScraperUserAgent = "scraper_user_agent"
const ScrapersPath = "scrapers_path"
scraping options
const SessionStoreKey = "session_store_key"
key used for session store
const ShowStudioAsText = "show_studio_as_text"
const SlideshowDelay = "slideshow_delay"
const SoundOnPreview = "sound_on_preview"
const Stash = "stash"
const StashBoxes = "stash_boxes"
stash-box options
const Username = "username"
const VideoExtensions = "video_extensions"
const VideoFileNamingAlgorithm = "video_file_naming_algorithm"
VideoFileNamingAlgorithm is the config key used to determine what hash should be used when generating and using generated files for scenes.
const WallPlayback = "wall_playback"
const WallShowTitle = "wall_show_title"
Variables ¶
This section is empty.
Functions ¶
func HasTLSConfig ¶ added in v0.8.0
func HasTLSConfig() bool
Types ¶
type Instance ¶ added in v0.7.0
type Instance struct {
// contains filtered or unexported fields
}
func GetInstance ¶ added in v0.7.0
func GetInstance() *Instance
func Initialize ¶ added in v0.7.0
func (*Instance) FinalizeSetup ¶ added in v0.7.0
func (i *Instance) FinalizeSetup()
func (*Instance) GetAutostartVideo ¶ added in v0.7.0
func (*Instance) GetCPUProfilePath ¶ added in v0.8.0
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) GetCSSEnabled ¶ added in v0.7.0
func (*Instance) GetCSSPath ¶ added in v0.7.0
func (*Instance) GetCachePath ¶ added in v0.7.0
func (*Instance) GetConfigFile ¶ added in v0.7.0
GetConfigFile returns the full path to the used configuration file.
func (*Instance) GetConfigFilePath ¶ added in v0.7.0
func (*Instance) GetConfigPath ¶ added in v0.7.0
GetConfigPath returns the path of the directory containing the used configuration file.
func (*Instance) GetCreateGalleriesFromFolders ¶ added in v0.7.0
func (*Instance) GetCredentials ¶ added in v0.7.0
func (*Instance) GetCustomServedFolders ¶ added in v0.7.0
GetCustomServedFolders gets the map of custom paths to their applicable filesystem locations
func (*Instance) GetCustomUILocation ¶ added in v0.7.0
func (*Instance) GetDLNADefaultEnabled ¶ added in v0.8.0
GetDLNADefaultEnabled returns true if the DLNA is enabled by default.
func (*Instance) GetDLNADefaultIPWhitelist ¶ added in v0.8.0
GetDLNADefaultIPWhitelist returns a list of IP addresses/wildcards that are allowed to use the DLNA service.
func (*Instance) GetDLNAInterfaces ¶ added in v0.8.0
GetDLNAInterfaces returns a list of interface names to expose DLNA on. If empty, runs on all interfaces.
func (*Instance) GetDLNAServerName ¶ added in v0.8.0
GetDLNAServerName returns the visible name of the DLNA server. If empty, "stash" will be used.
func (*Instance) GetDatabasePath ¶ added in v0.7.0
func (*Instance) GetDefaultDatabaseFilePath ¶ added in v0.7.0
GetDefaultDatabaseFilePath returns the default database filename, which is located in the same directory as the config file.
func (*Instance) GetDefaultPluginsPath ¶ added in v0.7.0
func (*Instance) GetDefaultScrapersPath ¶ added in v0.7.0
func (*Instance) GetExcludes ¶ added in v0.7.0
func (*Instance) GetExternalHost ¶ added in v0.7.0
func (*Instance) GetGalleryExtensions ¶ added in v0.7.0
func (*Instance) GetGeneratedPath ¶ added in v0.7.0
func (*Instance) GetHandyKey ¶ added in v0.8.0
func (*Instance) GetImageExcludes ¶ added in v0.7.0
func (*Instance) GetImageExtensions ¶ added in v0.7.0
func (*Instance) GetJWTSignKey ¶ added in v0.7.0
func (*Instance) GetLanguage ¶ added in v0.7.0
func (*Instance) GetLogAccess ¶ added in v0.7.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 (*Instance) GetLogFile ¶ added in v0.7.0
GetLogFile returns the filename of the file to output logs to. An empty string means that file logging will be disabled.
func (*Instance) GetLogLevel ¶ added in v0.7.0
GetLogLevel returns the lowest log level to write to the log. Should be one of "Debug", "Info", "Warning", "Error"
func (*Instance) GetLogOut ¶ added in v0.7.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 (*Instance) GetMaxSessionAge ¶ added in v0.7.0
GetMaxSessionAge gets the maximum age for session cookies, in seconds. Session cookie expiry times are refreshed every request.
func (*Instance) GetMaxStreamingTranscodeSize ¶ added in v0.7.0
func (i *Instance) GetMaxStreamingTranscodeSize() models.StreamingResolutionEnum
func (*Instance) GetMaxTranscodeSize ¶ added in v0.7.0
func (i *Instance) GetMaxTranscodeSize() models.StreamingResolutionEnum
func (*Instance) GetMaxUploadSize ¶ added in v0.7.0
Max allowed graphql upload size in megabytes
func (*Instance) GetMaximumLoopDuration ¶ added in v0.7.0
func (*Instance) GetMenuItems ¶ added in v0.7.0
Interface options
func (*Instance) GetMetadataPath ¶ added in v0.7.0
func (*Instance) GetParallelTasks ¶ added in v0.7.0
GetParallelTasks returns the number of parallel tasks that should be started by scan or generate task.
func (*Instance) GetParallelTasksWithAutoDetection ¶ added in v0.7.0
func (*Instance) GetPasswordHash ¶ added in v0.7.0
func (*Instance) GetPluginsPath ¶ added in v0.7.0
func (*Instance) GetPreviewAudio ¶ added in v0.8.0
func (*Instance) GetPreviewExcludeEnd ¶ added in v0.7.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 (*Instance) GetPreviewExcludeStart ¶ added in v0.7.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 (*Instance) GetPreviewPreset ¶ added in v0.7.0
func (i *Instance) GetPreviewPreset() models.PreviewPreset
GetPreviewPreset returns the preset when generating previews. Defaults to Slow.
func (*Instance) GetPreviewSegmentDuration ¶ added in v0.7.0
GetPreviewSegmentDuration returns the duration of a single segment in a scene preview file, in seconds.
func (*Instance) GetPreviewSegments ¶ added in v0.7.0
GetPreviewSegments returns the amount of segments in a scene preview file.
func (*Instance) GetScraperCDPPath ¶ added in v0.7.0
GetScraperCDPPath gets the path to the Chrome executable or remote address to an instance of Chrome.
func (*Instance) GetScraperCertCheck ¶ added in v0.7.0
GetScraperCertCheck returns true if the scraper should check for insecure certificates when fetching an image or a page.
func (*Instance) GetScraperUserAgent ¶ added in v0.7.0
func (*Instance) GetScrapersPath ¶ added in v0.7.0
func (*Instance) GetSessionStoreKey ¶ added in v0.7.0
func (*Instance) GetShowStudioAsText ¶ added in v0.7.0
func (*Instance) GetSlideshowDelay ¶ added in v0.7.0
func (*Instance) GetSoundOnPreview ¶ added in v0.7.0
func (*Instance) GetStashBoxes ¶ added in v0.7.0
func (*Instance) GetStashPaths ¶ added in v0.7.0
func (i *Instance) GetStashPaths() []*models.StashConfig
func (*Instance) GetUsername ¶ added in v0.7.0
func (*Instance) GetVideoExtensions ¶ added in v0.7.0
func (*Instance) GetVideoFileNamingAlgorithm ¶ added in v0.7.0
func (i *Instance) GetVideoFileNamingAlgorithm() models.HashAlgorithm
GetVideoFileNamingAlgorithm returns what hash algorithm should be used for naming generated scene video files.
func (*Instance) GetWallPlayback ¶ added in v0.7.0
func (*Instance) GetWallShowTitle ¶ added in v0.7.0
func (*Instance) HasCredentials ¶ added in v0.7.0
func (*Instance) IsCalculateMD5 ¶ added in v0.7.0
IsCalculateMD5 returns true if MD5 checksums should be generated for scene video files.
func (*Instance) IsNewSystem ¶ added in v0.7.0
func (*Instance) SetConfigFile ¶ added in v0.7.0
func (*Instance) SetInitialConfig ¶ added in v0.7.0
SetInitialConfig fills in missing required config fields
func (*Instance) SetPassword ¶ added in v0.7.0
func (*Instance) ValidateCredentials ¶ added in v0.7.0
func (*Instance) ValidateStashBoxes ¶ added in v0.7.0
func (i *Instance) ValidateStashBoxes(boxes []*models.StashBoxInput) error
type MissingConfigError ¶ added in v0.7.0
type MissingConfigError struct {
// contains filtered or unexported fields
}
func (MissingConfigError) Error ¶ added in v0.7.0
func (e MissingConfigError) Error() string