|
|
@ -99,13 +99,7 @@ struct Config
|
|
|
|
YAML.mapping({
|
|
|
|
YAML.mapping({
|
|
|
|
channel_threads: Int32, # Number of threads to use for crawling videos from channels (for updating subscriptions)
|
|
|
|
channel_threads: Int32, # Number of threads to use for crawling videos from channels (for updating subscriptions)
|
|
|
|
feed_threads: Int32, # Number of threads to use for updating feeds
|
|
|
|
feed_threads: Int32, # Number of threads to use for updating feeds
|
|
|
|
db: NamedTuple( # Database configuration
|
|
|
|
db: DBConfig, # Database configuration
|
|
|
|
user: String,
|
|
|
|
|
|
|
|
password: String,
|
|
|
|
|
|
|
|
host: String,
|
|
|
|
|
|
|
|
port: Int32,
|
|
|
|
|
|
|
|
dbname: String,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
full_refresh: Bool, # Used for crawling channels: threads should check all videos uploaded by a channel
|
|
|
|
full_refresh: Bool, # Used for crawling channels: threads should check all videos uploaded by a channel
|
|
|
|
https_only: Bool?, # Used to tell Invidious it is behind a proxy, so links to resources should be https://
|
|
|
|
https_only: Bool?, # Used to tell Invidious it is behind a proxy, so links to resources should be https://
|
|
|
|
hmac_key: String?, # HMAC signing key for CSRF tokens and verifying pubsub subscriptions
|
|
|
|
hmac_key: String?, # HMAC signing key for CSRF tokens and verifying pubsub subscriptions
|
|
|
@ -132,6 +126,16 @@ user: String,
|
|
|
|
})
|
|
|
|
})
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
struct DBConfig
|
|
|
|
|
|
|
|
yaml_mapping({
|
|
|
|
|
|
|
|
user: String,
|
|
|
|
|
|
|
|
password: String,
|
|
|
|
|
|
|
|
host: String,
|
|
|
|
|
|
|
|
port: Int32,
|
|
|
|
|
|
|
|
dbname: String,
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
def rank_videos(db, n)
|
|
|
|
def rank_videos(db, n)
|
|
|
|
top = [] of {Float64, String}
|
|
|
|
top = [] of {Float64, String}
|
|
|
|
|
|
|
|
|
|
|
|