From 34ae6f4aa2c9b7a5f90ccd97bee2649ed9c114e4 Mon Sep 17 00:00:00 2001 From: syeopite Date: Mon, 19 Feb 2024 15:05:03 -0800 Subject: [PATCH] Move hook for videojs-contrib-quality-levels to config file --- scripts/fetch-player-dependencies.cr | 6 ++---- videojs-dependencies.yml | 3 +++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/fetch-player-dependencies.cr b/scripts/fetch-player-dependencies.cr index 5eb40c7b..b10122bf 100755 --- a/scripts/fetch-player-dependencies.cr +++ b/scripts/fetch-player-dependencies.cr @@ -14,6 +14,7 @@ struct InstallInstruction property js_path : String? = nil property css_path : String? = nil property download_as : String? = nil + property no_styling : Bool = false end # Object representing a dependency specified within `videojs-dependencies.yml` @@ -34,15 +35,12 @@ class ConfigDependency # Does the directory exist? # Does the Javascript file exist? # Does the CSS file exist? - # - # videojs-contrib-quality-levels.js is the only dependency that does not come with a CSS file so - # we skip the check there if !Dir.exists?(path) Dir.mkdir(path) return true elsif !(File.exists?("#{path}/#{name}.js") || File.exists?("#{path}/versions.yml")) return true - elsif name != "videojs-contrib-quality-levels" && !File.exists?("#{path}/#{name}.css") + elsif !(self.install_instructions.try &.no_styling) && !File.exists?("#{path}/#{name}.css") return true end diff --git a/videojs-dependencies.yml b/videojs-dependencies.yml index 274a960a..38f4cff3 100644 --- a/videojs-dependencies.yml +++ b/videojs-dependencies.yml @@ -21,6 +21,9 @@ dependencies: version: 2.1.0 shasum: 046e9e21ed01043f512b83a1916001d552457083 + install_instructions: + no_styling: true + videojs-http-source-selector: version: 1.1.6 shasum: 073aadbea0106ba6c98d6b611094dbf8554ffa1f