mirror of
https://github.com/iv-org/invidious.git
synced 2024-12-05 21:19:27 +05:30
VideoJS Dep. Manager: Allow custom registry url
This commit is contained in:
parent
71806ae18b
commit
ee5a396a0a
@ -72,6 +72,7 @@ class PlayerDependenciesConfig
|
|||||||
include YAML::Serializable
|
include YAML::Serializable
|
||||||
|
|
||||||
property version : String
|
property version : String
|
||||||
|
property registry_url : String
|
||||||
property dependencies : Hash(YAML::Any, ConfigDependency)
|
property dependencies : Hash(YAML::Any, ConfigDependency)
|
||||||
|
|
||||||
def get_dependencies_to_fetch
|
def get_dependencies_to_fetch
|
||||||
@ -131,7 +132,7 @@ class Dependency
|
|||||||
Dir.mkdir(@download_path)
|
Dir.mkdir(@download_path)
|
||||||
end
|
end
|
||||||
|
|
||||||
HTTP::Client.get("https://registry.npmjs.org/#{@dependency}/-/#{@dependency}-#{@config.version}.tgz") do |response|
|
HTTP::Client.get("#{CONFIG.dependency_config.registry_url}}/#{@dependency}/-/#{@dependency}-#{@config.version}.tgz") do |response|
|
||||||
data = response.body_io.gets_to_end
|
data = response.body_io.gets_to_end
|
||||||
File.write(downloaded_package_path, data)
|
File.write(downloaded_package_path, data)
|
||||||
self.validate_checksum(data)
|
self.validate_checksum(data)
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
version: 1
|
version: 1
|
||||||
|
registry_url: "https://registry.npmjs.org"
|
||||||
dependencies:
|
dependencies:
|
||||||
#Due to a 'video append of' error (see #3011), we're stuck on 7.12.1.
|
#Due to a 'video append of' error (see #3011), we're stuck on 7.12.1.
|
||||||
video.js:
|
video.js:
|
||||||
|
Loading…
Reference in New Issue
Block a user