mirror of
https://github.com/iv-org/invidious.git
synced 2024-12-02 11:41:08 +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 js_path : String? = nil
|
||||||
property css_path : String? = nil
|
property css_path : String? = nil
|
||||||
property download_as : String? = nil
|
property download_as : String? = nil
|
||||||
|
property no_styling : Bool = false
|
||||||
end
|
end
|
||||||
|
|
||||||
# Object representing a dependency specified within `videojs-dependencies.yml`
|
# Object representing a dependency specified within `videojs-dependencies.yml`
|
||||||
@ -34,15 +35,12 @@ class ConfigDependency
|
|||||||
# Does the directory exist?
|
# Does the directory exist?
|
||||||
# Does the Javascript file exist?
|
# Does the Javascript file exist?
|
||||||
# Does the CSS 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)
|
if !Dir.exists?(path)
|
||||||
Dir.mkdir(path)
|
Dir.mkdir(path)
|
||||||
return true
|
return true
|
||||||
elsif !(File.exists?("#{path}/#{name}.js") || File.exists?("#{path}/versions.yml"))
|
elsif !(File.exists?("#{path}/#{name}.js") || File.exists?("#{path}/versions.yml"))
|
||||||
return true
|
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
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -21,6 +21,9 @@ dependencies:
|
|||||||
version: 2.1.0
|
version: 2.1.0
|
||||||
shasum: 046e9e21ed01043f512b83a1916001d552457083
|
shasum: 046e9e21ed01043f512b83a1916001d552457083
|
||||||
|
|
||||||
|
install_instructions:
|
||||||
|
no_styling: true
|
||||||
|
|
||||||
videojs-http-source-selector:
|
videojs-http-source-selector:
|
||||||
version: 1.1.6
|
version: 1.1.6
|
||||||
shasum: 073aadbea0106ba6c98d6b611094dbf8554ffa1f
|
shasum: 073aadbea0106ba6c98d6b611094dbf8554ffa1f
|
||||||
|
Loading…
Reference in New Issue
Block a user