config

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2021 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const ApiKey = "api_key"
View Source
const AutostartVideo = "autostart_video"
View Source
const CSSEnabled = "cssEnabled"
View Source
const Cache = "cache"
View Source
const CalculateMD5 = "calculate_md5"

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

View Source
const CreateGalleriesFromFolders = "create_galleries_from_folders"
View Source
const CustomServedFolders = "custom_served_folders"

served directories this should be manually configured only

View Source
const CustomUILocation = "custom_ui_location"

UI directory. Overrides to serve the UI from a specific location rather than use the embedded UI.

View Source
const DLNADefaultEnabled = "dlna.default_enabled"
View Source
const DLNADefaultIPWhitelist = "dlna.default_whitelist"
View Source
const DLNAInterfaces = "dlna.interfaces"
View Source
const DLNAServerName = "dlna.server_name"

DLNA options

View Source
const Database = "database"
View Source
const DefaultMaxSessionAge = 60 * 60 * 1 // 1 hours
View Source
const Downloads = "downloads"
View Source
const Exclude = "exclude"
View Source
const ExternalHost = "external_host"
View Source
const GalleryExtensions = "gallery_extensions"
View Source
const Generated = "generated"
View Source
const HandyKey = "handy_key"
View Source
const Host = "host"
View Source
const ImageExclude = "image_exclude"
View Source
const ImageExtensions = "image_extensions"
View Source
const JWTSignKey = "jwt_secret_key"

key used to sign JWT tokens

View Source
const Language = "language"

i18n

View Source
const LogAccess = "logAccess"
View Source
const LogFile = "logFile"

Logging options

View Source
const LogLevel = "logLevel"
View Source
const LogOut = "logOut"
View Source
const MaxSessionAge = "max_session_age"
View Source
const MaxStreamingTranscodeSize = "max_streaming_transcode_size"
View Source
const MaxTranscodeSize = "max_transcode_size"
View Source
const MaxUploadSize = "max_upload_size"

File upload options

View Source
const MaximumLoopDuration = "maximum_loop_duration"
View Source
const MenuItems = "menu_items"

Interface options

View Source
const Metadata = "metadata"
View Source
const ParallelTasks = "parallel_tasks"
View Source
const Password = "password"
View Source
const PluginsPath = "plugins_path"

plugin options

View Source
const Port = "port"
View Source
const PreviewAudio = "preview_audio"
View Source
const PreviewExcludeEnd = "preview_exclude_end"
View Source
const PreviewExcludeStart = "preview_exclude_start"
View Source
const PreviewPreset = "preview_preset"
View Source
const PreviewSegmentDuration = "preview_segment_duration"
View Source
const PreviewSegments = "preview_segments"
View Source
const ScraperCDPPath = "scraper_cdp_path"
View Source
const ScraperCertCheck = "scraper_cert_check"
View Source
const ScraperUserAgent = "scraper_user_agent"
View Source
const ScrapersPath = "scrapers_path"

scraping options

View Source
const SessionStoreKey = "session_store_key"

key used for session store

View Source
const ShowStudioAsText = "show_studio_as_text"
View Source
const SlideshowDelay = "slideshow_delay"
View Source
const SoundOnPreview = "sound_on_preview"
View Source
const Stash = "stash"
View Source
const StashBoxes = "stash_boxes"

stash-box options

View Source
const Username = "username"
View Source
const VideoExtensions = "video_extensions"
View Source
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.

View Source
const WallPlayback = "wall_playback"
View Source
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 Initialize() (*Instance, error)

func (*Instance) FinalizeSetup added in v0.7.0

func (i *Instance) FinalizeSetup()

func (*Instance) GetAPIKey added in v0.7.0

func (i *Instance) GetAPIKey() string

func (*Instance) GetAutostartVideo added in v0.7.0

func (i *Instance) GetAutostartVideo() bool

func (*Instance) GetCPUProfilePath added in v0.8.0

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 added in v0.7.0

func (i *Instance) GetCSS() string

func (*Instance) GetCSSEnabled added in v0.7.0

func (i *Instance) GetCSSEnabled() bool

func (*Instance) GetCSSPath added in v0.7.0

func (i *Instance) GetCSSPath() string

func (*Instance) GetCachePath added in v0.7.0

func (i *Instance) GetCachePath() string

func (*Instance) GetConfigFile added in v0.7.0

func (i *Instance) GetConfigFile() string

GetConfigFile returns the full path to the used configuration file.

func (*Instance) GetConfigFilePath added in v0.7.0

func (i *Instance) GetConfigFilePath() string

func (*Instance) GetConfigPath added in v0.7.0

func (i *Instance) GetConfigPath() string

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

func (*Instance) GetCreateGalleriesFromFolders added in v0.7.0

func (i *Instance) GetCreateGalleriesFromFolders() bool

func (*Instance) GetCredentials added in v0.7.0

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

func (*Instance) GetCustomServedFolders added in v0.7.0

func (i *Instance) GetCustomServedFolders() URLMap

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

func (*Instance) GetCustomUILocation added in v0.7.0

func (i *Instance) GetCustomUILocation() string

func (*Instance) GetDLNADefaultEnabled added in v0.8.0

func (i *Instance) GetDLNADefaultEnabled() bool

GetDLNADefaultEnabled returns true if the DLNA is enabled by default.

func (*Instance) GetDLNADefaultIPWhitelist added in v0.8.0

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

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

func (*Instance) GetDLNAInterfaces added in v0.8.0

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 added in v0.8.0

func (i *Instance) GetDLNAServerName() string

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

func (*Instance) GetDatabasePath added in v0.7.0

func (i *Instance) GetDatabasePath() string

func (*Instance) GetDefaultDatabaseFilePath added in v0.7.0

func (i *Instance) GetDefaultDatabaseFilePath() string

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 (i *Instance) GetDefaultPluginsPath() string

func (*Instance) GetDefaultScrapersPath added in v0.7.0

func (i *Instance) GetDefaultScrapersPath() string

func (*Instance) GetExcludes added in v0.7.0

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

func (*Instance) GetExternalHost added in v0.7.0

func (i *Instance) GetExternalHost() string

func (*Instance) GetGalleryExtensions added in v0.7.0

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

func (*Instance) GetGeneratedPath added in v0.7.0

func (i *Instance) GetGeneratedPath() string

func (*Instance) GetHandyKey added in v0.8.0

func (i *Instance) GetHandyKey() string

func (*Instance) GetHost added in v0.7.0

func (i *Instance) GetHost() string

func (*Instance) GetImageExcludes added in v0.7.0

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

func (*Instance) GetImageExtensions added in v0.7.0

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

func (*Instance) GetJWTSignKey added in v0.7.0

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

func (*Instance) GetLanguage added in v0.7.0

func (i *Instance) GetLanguage() string

func (*Instance) GetLogAccess added in v0.7.0

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 added in v0.7.0

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 added in v0.7.0

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 added in v0.7.0

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 added in v0.7.0

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 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

func (i *Instance) GetMaxUploadSize() int64

Max allowed graphql upload size in megabytes

func (*Instance) GetMaximumLoopDuration added in v0.7.0

func (i *Instance) GetMaximumLoopDuration() int

func (*Instance) GetMenuItems added in v0.7.0

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

Interface options

func (*Instance) GetMetadataPath added in v0.7.0

func (i *Instance) GetMetadataPath() string

func (*Instance) GetParallelTasks added in v0.7.0

func (i *Instance) GetParallelTasks() int

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 (i *Instance) GetParallelTasksWithAutoDetection() int

func (*Instance) GetPasswordHash added in v0.7.0

func (i *Instance) GetPasswordHash() string

func (*Instance) GetPluginsPath added in v0.7.0

func (i *Instance) GetPluginsPath() string

func (*Instance) GetPort added in v0.7.0

func (i *Instance) GetPort() int

func (*Instance) GetPreviewAudio added in v0.8.0

func (i *Instance) GetPreviewAudio() bool

func (*Instance) GetPreviewExcludeEnd added in v0.7.0

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 added in v0.7.0

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 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

func (i *Instance) GetPreviewSegmentDuration() float64

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

func (*Instance) GetPreviewSegments added in v0.7.0

func (i *Instance) GetPreviewSegments() int

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

func (*Instance) GetScraperCDPPath added in v0.7.0

func (i *Instance) GetScraperCDPPath() string

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

func (*Instance) GetScraperCertCheck added in v0.7.0

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) GetScraperUserAgent added in v0.7.0

func (i *Instance) GetScraperUserAgent() string

func (*Instance) GetScrapersPath added in v0.7.0

func (i *Instance) GetScrapersPath() string

func (*Instance) GetSessionStoreKey added in v0.7.0

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

func (*Instance) GetShowStudioAsText added in v0.7.0

func (i *Instance) GetShowStudioAsText() bool

func (*Instance) GetSlideshowDelay added in v0.7.0

func (i *Instance) GetSlideshowDelay() int

func (*Instance) GetSoundOnPreview added in v0.7.0

func (i *Instance) GetSoundOnPreview() bool

func (*Instance) GetStashBoxes added in v0.7.0

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

func (*Instance) GetStashPaths added in v0.7.0

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

func (*Instance) GetUsername added in v0.7.0

func (i *Instance) GetUsername() string

func (*Instance) GetVideoExtensions added in v0.7.0

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

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 (i *Instance) GetWallPlayback() string

func (*Instance) GetWallShowTitle added in v0.7.0

func (i *Instance) GetWallShowTitle() bool

func (*Instance) HasCredentials added in v0.7.0

func (i *Instance) HasCredentials() bool

func (*Instance) IsCalculateMD5 added in v0.7.0

func (i *Instance) IsCalculateMD5() bool

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

func (*Instance) IsNewSystem added in v0.7.0

func (i *Instance) IsNewSystem() bool

func (*Instance) Set added in v0.7.0

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

func (*Instance) SetCSS added in v0.7.0

func (i *Instance) SetCSS(css string)

func (*Instance) SetConfigFile added in v0.7.0

func (i *Instance) SetConfigFile(fn string)

func (*Instance) SetInitialConfig added in v0.7.0

func (i *Instance) SetInitialConfig() error

SetInitialConfig fills in missing required config fields

func (*Instance) SetPassword added in v0.7.0

func (i *Instance) SetPassword(value string)

func (*Instance) Validate added in v0.7.0

func (i *Instance) Validate() error

func (*Instance) ValidateCredentials added in v0.7.0

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

func (*Instance) ValidateStashBoxes added in v0.7.0

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

func (*Instance) Write added in v0.7.0

func (i *Instance) Write() 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

type URLMap added in v0.3.0

type URLMap map[string]string

func (URLMap) GetFilesystemLocation added in v0.3.0

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