mirror of
https://github.com/iv-org/invidious.git
synced 2024-11-30 02:32:56 +05:30
Move hook for videojs-contrib-quality-levels to config file
This commit is contained in:
parent
8f129b85ad
commit
34ae6f4aa2
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user