mirror of
https://github.com/iv-org/invidious.git
synced 2025-04-22 16:29:10 -04:00
typo loopback - lookback
This commit is contained in:
parent
c9e89b2353
commit
bbdb7feaa7
@ -239,6 +239,13 @@ https_only: false
|
||||
##
|
||||
#statistics_enabled: false
|
||||
|
||||
##
|
||||
## Maximum videos to be loaded into the playlist before the video playing
|
||||
##
|
||||
## Accepted values: a positive integer
|
||||
## Default: 50
|
||||
##
|
||||
max_lookback: 50
|
||||
|
||||
# -----------------------------
|
||||
# Users and accounts
|
||||
|
@ -2462,9 +2462,9 @@ end
|
||||
next error_json(404, "Playlist does not exist.")
|
||||
end
|
||||
|
||||
# includes into the playlist a maximum of CONFIG.max_loopback videos, before the offset
|
||||
# includes into the playlist a maximum of CONFIG.max_lookback videos, before the offset
|
||||
if offset > 0
|
||||
lookback = offset < CONFIG.max_loopback ? offset : CONFIG.max_loopback
|
||||
lookback = offset < CONFIG.max_lookback ? offset : CONFIG.max_lookback
|
||||
response = playlist.to_json(offset - lookback, locale)
|
||||
json_response = JSON.parse(response)
|
||||
else
|
||||
@ -2479,7 +2479,7 @@ end
|
||||
|
||||
if json_response["videos"].as_a[0]["index"] != offset
|
||||
offset = json_response["videos"].as_a[0]["index"].as_i
|
||||
lookback = offset < CONFIG.max_loopback ? offset : CONFIG.max_loopback
|
||||
lookback = offset < CONFIG.max_lookback ? offset : CONFIG.max_lookback
|
||||
response = playlist.to_json(offset - lookback, locale)
|
||||
json_response = JSON.parse(response)
|
||||
end
|
||||
|
@ -73,7 +73,6 @@ class Config
|
||||
property output : String = "STDOUT" # Log file path or STDOUT
|
||||
property log_level : LogLevel = LogLevel::Info # Default log level, valid YAML values are ints and strings, see src/invidious/helpers/logger.cr
|
||||
property db : DBConfig? = nil # Database configuration with separate parameters (username, hostname, etc)
|
||||
property max_loopback : Int32 = 100 # Maximum videos to be loaded into the playlist before the video playing
|
||||
|
||||
@[YAML::Field(converter: Preferences::URIConverter)]
|
||||
property database_url : URI = URI.parse("") # Database configuration using 12-Factor "Database URL" syntax
|
||||
@ -97,6 +96,7 @@ class Config
|
||||
property banner : String? = nil # Optional banner to be displayed along top of page for announcements, etc.
|
||||
property hsts : Bool? = true # Enables 'Strict-Transport-Security'. Ensure that `domain` and all subdomains are served securely
|
||||
property disable_proxy : Bool? | Array(String)? = false # Disable proxying server-wide: options: 'dash', 'livestreams', 'downloads', 'local'
|
||||
property max_lookback : Int32 = 50 # Maximum videos to be loaded into the playlist before the video playing
|
||||
|
||||
@[YAML::Field(converter: Preferences::FamilyConverter)]
|
||||
property force_resolve : Socket::Family = Socket::Family::UNSPEC # Connect to YouTube over 'ipv6', 'ipv4'. Will sometimes resolve fix issues with rate-limiting (see https://github.com/ytdl-org/youtube-dl/issues/21729)
|
||||
|
Loading…
x
Reference in New Issue
Block a user