From 818147bd420545a62066333d97fd0e0340c55dfa Mon Sep 17 00:00:00 2001 From: Omar Roth Date: Fri, 30 Nov 2018 18:07:46 -0600 Subject: [PATCH] Add option to disable DRM decryption --- src/invidious.cr | 8 +++++--- src/invidious/helpers/helpers.cr | 4 ++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/invidious.cr b/src/invidious.cr index c173748a..f2273d7a 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -78,9 +78,11 @@ REDDIT_URL = URI.parse("https://www.reddit.com") LOGIN_URL = URI.parse("https://accounts.google.com") decrypt_function = [] of {name: String, value: Int32} -spawn do - update_decrypt_function do |function| - decrypt_function = function +if CONFIG.decrypt_drm + spawn do + update_decrypt_function do |function| + decrypt_function = function + end end end diff --git a/src/invidious/helpers/helpers.cr b/src/invidious/helpers/helpers.cr index ef7c2e31..80b8556f 100644 --- a/src/invidious/helpers/helpers.cr +++ b/src/invidious/helpers/helpers.cr @@ -16,6 +16,10 @@ class Config hmac_key: String?, full_refresh: Bool, domain: String?, + decrypt_drm: { + type: Bool?, + default: true, + }, }) end