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