diff options
| author | Samantaz Fox <coding@samantaz.fr> | 2024-08-13 20:26:59 +0200 |
|---|---|---|
| committer | Samantaz Fox <coding@samantaz.fr> | 2024-08-13 20:26:59 +0200 |
| commit | 2d7869b48ba1c1aca04fd66c52d37853321775cf (patch) | |
| tree | ca3e1d1addf89aa1a69669f4a29686b6f9e177ba /src/invidious.cr | |
| parent | 88b9f173886169720f80a65485c23641ed4e323c (diff) | |
| parent | cc36a8293359764c8df38605818242c60f41bbec (diff) | |
| download | invidious-2d7869b48ba1c1aca04fd66c52d37853321775cf.tar.gz invidious-2d7869b48ba1c1aca04fd66c52d37853321775cf.tar.bz2 invidious-2d7869b48ba1c1aca04fd66c52d37853321775cf.zip | |
Add support for an external signature server (#4772)
This PR adds support for inv_sig_helper, which offloads the player fetching,
function extraction and signature parsing, which in turn allows to use the
web client to watch videos.
When the new config option "signature_server" is not set, the logic for the
external signature server is not enabled and invidious behaves like before.
This PR also updates the crystal overrides because the stdlib changed quite
a while ago (See issue 11049 at crystal-lang/crystal) and those were required
to properly use TCP/unix sockets.
Closes issue 4649
Diffstat (limited to 'src/invidious.cr')
| -rw-r--r-- | src/invidious.cr | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/invidious.cr b/src/invidious.cr index e0bd0101..3804197e 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -153,6 +153,15 @@ Invidious::Database.check_integrity(CONFIG) {% puts "\nDone checking player dependencies, now compiling Invidious...\n" %} {% end %} +# Misc + +DECRYPT_FUNCTION = + if sig_helper_address = CONFIG.signature_server.presence + IV::DecryptFunction.new(sig_helper_address) + else + nil + end + # Start jobs if CONFIG.channel_threads > 0 @@ -163,11 +172,6 @@ if CONFIG.feed_threads > 0 Invidious::Jobs.register Invidious::Jobs::RefreshFeedsJob.new(PG_DB) end -DECRYPT_FUNCTION = DecryptFunction.new(CONFIG.decrypt_polling) -if CONFIG.decrypt_polling - Invidious::Jobs.register Invidious::Jobs::UpdateDecryptFunctionJob.new -end - if CONFIG.statistics_enabled Invidious::Jobs.register Invidious::Jobs::StatisticsRefreshJob.new(PG_DB, SOFTWARE) end |
