mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-04-11.git
synced 2024-08-15 00:43:26 +00:00
Disable language filtering when there is no key
This commit is contained in:
parent
6b5c9cfaf1
commit
97b93d548b
2 changed files with 5 additions and 2 deletions
|
@ -25,7 +25,7 @@ class Config
|
||||||
dbname: String,
|
dbname: String,
|
||||||
),
|
),
|
||||||
redirect: Bool,
|
redirect: Bool,
|
||||||
dl_api_key: String | Nil,
|
dl_api_key: String?,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -140,10 +140,13 @@ spawn do
|
||||||
DetectLanguage.configure do |config|
|
DetectLanguage.configure do |config|
|
||||||
config.api_key = CONFIG.dl_api_key.not_nil!
|
config.api_key = CONFIG.dl_api_key.not_nil!
|
||||||
end
|
end
|
||||||
|
filter = true
|
||||||
|
else
|
||||||
|
filter = false
|
||||||
end
|
end
|
||||||
|
|
||||||
loop do
|
loop do
|
||||||
top = rank_videos(PG_DB, 40, youtube_pool, true)
|
top = rank_videos(PG_DB, 40, youtube_pool, filter)
|
||||||
|
|
||||||
if top.size > 0
|
if top.size > 0
|
||||||
args = arg_array(top)
|
args = arg_array(top)
|
||||||
|
|
Loading…
Reference in a new issue