diff options
| author | Omar Roth <omarroth@hotmail.com> | 2018-03-16 19:52:25 -0500 |
|---|---|---|
| committer | Omar Roth <omarroth@hotmail.com> | 2018-03-16 19:52:25 -0500 |
| commit | 97b93d548beff66a5152c95af758ad059fcc7e59 (patch) | |
| tree | 3be195bc1aecd21b3e04bd5c492e85bfa519fe07 | |
| parent | 6b5c9cfaf1a7177c1779856c9631a5fa911a8705 (diff) | |
| download | invidious-97b93d548beff66a5152c95af758ad059fcc7e59.tar.gz invidious-97b93d548beff66a5152c95af758ad059fcc7e59.tar.bz2 invidious-97b93d548beff66a5152c95af758ad059fcc7e59.zip | |
Disable language filtering when there is no key
| -rw-r--r-- | src/helpers.cr | 2 | ||||
| -rw-r--r-- | src/invidious.cr | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/helpers.cr b/src/helpers.cr index e01b847a..5ba9c461 100644 --- a/src/helpers.cr +++ b/src/helpers.cr @@ -25,7 +25,7 @@ class Config dbname: String, ), redirect: Bool, - dl_api_key: String | Nil, + dl_api_key: String?, }) end diff --git a/src/invidious.cr b/src/invidious.cr index f373be42..9d34f28b 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -140,10 +140,13 @@ spawn do DetectLanguage.configure do |config| config.api_key = CONFIG.dl_api_key.not_nil! end + filter = true + else + filter = false end loop do - top = rank_videos(PG_DB, 40, youtube_pool, true) + top = rank_videos(PG_DB, 40, youtube_pool, filter) if top.size > 0 args = arg_array(top) |
