config

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2021 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

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

func GetAutostartVideo() bool

func GetCSS

func GetCSS() string

func GetCSSEnabled

func GetCSSEnabled() bool

func GetCSSPath

func GetCSSPath() string

func GetCachePath

func GetCachePath() string

func GetConfigFilePath added in v0.6.0

func GetConfigFilePath() string

func GetConfigPath added in v0.3.0

func GetConfigPath() string

func GetCreateGalleriesFromFolders added in v0.4.0

func GetCreateGalleriesFromFolders() bool

func GetCredentials

func GetCredentials() (string, string)

func GetDatabasePath

func GetDatabasePath() string

func GetDefaultPluginsPath added in v0.3.0

func GetDefaultPluginsPath() string

func GetDefaultScrapersPath

func GetDefaultScrapersPath() string

func GetExcludes

func GetExcludes() []string

func GetExternalHost

func GetExternalHost() string

func GetGalleryExtensions added in v0.4.0

func GetGalleryExtensions() []string

func GetGeneratedPath

func GetGeneratedPath() string

func GetHost

func GetHost() string

func GetImageExcludes added in v0.4.0

func GetImageExcludes() []string

func GetImageExtensions added in v0.4.0

func GetImageExtensions() []string

func GetJWTSignKey added in v0.2.0

func GetJWTSignKey() []byte

func GetLanguage added in v0.2.0

func GetLanguage() string

func GetLogAccess

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

func GetLogFile() string

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

func GetLogLevel

func GetLogLevel() string

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

func GetLogOut

func 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 GetMaxSessionAge added in v0.2.0

func GetMaxSessionAge() int

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

func GetMaxStreamingTranscodeSize

func GetMaxStreamingTranscodeSize() models.StreamingResolutionEnum

func GetMaxTranscodeSize

func GetMaxTranscodeSize() models.StreamingResolutionEnum

func GetMaxUploadSize added in v0.5.0

func GetMaxUploadSize() int64

Max allowed graphql upload size in megabytes

func GetMaximumLoopDuration

func GetMaximumLoopDuration() int

func GetMenuItems added in v0.5.0

func GetMenuItems() []string

Interface options

func GetMetadataPath

func GetMetadataPath() string

func GetParallelTasks added in v0.5.0

func GetParallelTasks() int

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

func GetParallelTasksWithAutoDetection added in v0.5.0

func GetParallelTasksWithAutoDetection() int

func GetPasswordHash

func GetPasswordHash() string

func GetPluginsPath added in v0.3.0

func GetPluginsPath() string

func GetPort

func GetPort() int

func GetPreviewExcludeEnd added in v0.3.0

func 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 GetPreviewExcludeStart added in v0.3.0

func 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 GetPreviewPreset added in v0.3.0

func GetPreviewPreset() models.PreviewPreset

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

func GetPreviewSegmentDuration added in v0.3.0

func GetPreviewSegmentDuration() float64

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

func GetPreviewSegments added in v0.3.0

func GetPreviewSegments() int

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

func GetScraperCDPPath added in v0.3.0

func GetScraperCDPPath() string

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

func GetScraperCertCheck added in v0.6.0

func GetScraperCertCheck() bool

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

func GetScraperUserAgent added in v0.2.0

func GetScraperUserAgent() string

func GetScrapersPath

func GetScrapersPath() string

func GetSessionStoreKey added in v0.2.0

func GetSessionStoreKey() []byte

func GetShowStudioAsText

func GetShowStudioAsText() bool

func GetSoundOnPreview

func GetSoundOnPreview() bool

func GetStashBoxes added in v0.4.0

func GetStashBoxes() []*models.StashBox

func GetStashPaths

func GetStashPaths() []*models.StashConfig

func GetUsername

func GetUsername() string

func GetVideoExtensions added in v0.4.0

func GetVideoExtensions() []string

func GetVideoFileNamingAlgorithm added in v0.3.0

func GetVideoFileNamingAlgorithm() models.HashAlgorithm

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

func GetWallPlayback added in v0.2.0

func GetWallPlayback() string

func GetWallShowTitle

func GetWallShowTitle() bool

func HasCredentials

func HasCredentials() bool

func IsCalculateMD5 added in v0.3.0

func IsCalculateMD5() bool

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

func IsValid

func IsValid() bool

func Set

func Set(key string, value interface{})

func SetCSS

func SetCSS(css string)

func SetInitialConfig added in v0.2.0

func SetInitialConfig() error

SetInitialConfig fills in missing required config fields

func SetPassword

func SetPassword(value string)

func ValidateCredentials

func ValidateCredentials(username string, password string) bool

func ValidateStashBoxes added in v0.4.0

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

func Write

func Write() error

Types

type URLMap added in v0.3.0

type URLMap map[string]string

func GetCustomServedFolders added in v0.3.0

func GetCustomServedFolders() URLMap

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

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