Move hook for videojs-contrib-quality-levels to config file

This commit is contained in:
syeopite 2024-02-19 15:05:03 -08:00
parent 8f129b85ad
commit 34ae6f4aa2
No known key found for this signature in database
GPG Key ID: A73C186DA3955A1A
2 changed files with 5 additions and 4 deletions

View File

@ -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

View File

@ -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