mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-08-14.git
synced 2024-08-15 00:53:20 +00:00
add config to decrypt on demand instead of polling
This commit is contained in:
parent
28dac81a90
commit
3a2bd4e928
5 changed files with 74 additions and 51 deletions
|
@ -168,7 +168,11 @@ end
|
|||
Invidious::Jobs.register Invidious::Jobs::RefreshChannelsJob.new(PG_DB, logger, config)
|
||||
Invidious::Jobs.register Invidious::Jobs::RefreshFeedsJob.new(PG_DB, logger, config)
|
||||
Invidious::Jobs.register Invidious::Jobs::SubscribeToFeedsJob.new(PG_DB, logger, config, HMAC_KEY)
|
||||
Invidious::Jobs.register Invidious::Jobs::UpdateDecryptFunctionJob.new
|
||||
|
||||
DECRYPT_FUNCTION = DecryptFunction.new(CONFIG.decrypt_polling)
|
||||
if config.decrypt_polling
|
||||
Invidious::Jobs.register Invidious::Jobs::UpdateDecryptFunctionJob.new(logger)
|
||||
end
|
||||
|
||||
if config.statistics_enabled
|
||||
Invidious::Jobs.register Invidious::Jobs::StatisticsRefreshJob.new(PG_DB, config, SOFTWARE)
|
||||
|
@ -191,8 +195,6 @@ def popular_videos
|
|||
Invidious::Jobs::PullPopularVideosJob::POPULAR_VIDEOS.get
|
||||
end
|
||||
|
||||
DECRYPT_FUNCTION = Invidious::Jobs::UpdateDecryptFunctionJob::DECRYPT_FUNCTION
|
||||
|
||||
before_all do |env|
|
||||
preferences = begin
|
||||
Preferences.from_json(env.request.cookies["PREFS"]?.try &.value || "{}")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue