From d574463c2df3997462a490ae5aaff39a8a4364e6 Mon Sep 17 00:00:00 2001 From: Jan Cernik <66427541+jancernik@users.noreply.github.com> Date: Wed, 25 Jan 2023 12:40:57 -0300 Subject: [PATCH] FIX: lazy_yt_enabled doesn't affect the engine (#19997) --- plugins/lazy-yt/plugin.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/lazy-yt/plugin.rb b/plugins/lazy-yt/plugin.rb index 30beccd7fa..5fb481c041 100644 --- a/plugins/lazy-yt/plugin.rb +++ b/plugins/lazy-yt/plugin.rb @@ -21,7 +21,7 @@ class Onebox::Engine::YoutubeOnebox alias_method :yt_onebox_to_html, :to_html def to_html - if video_id && !params["list"] + if SiteSetting.lazy_yt_enabled && video_id && !params["list"] size_restricted = [params["width"], params["height"]].any? video_width = (params["width"] && params["width"].to_i <= 695) ? params["width"] : 690 # embed width video_height = (params["height"] && params["height"].to_i <= 500) ? params["height"] : 388 # embed height