mediainfo 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +0 -1
- data/lib/mediainfo.rb +4 -5
- data/lib/mediainfo/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0f010ee33c89c683b3d413280d599017d3974e9cffc256fdec2a521b0b34a3ee
|
4
|
+
data.tar.gz: e601d403a247ecd73f09b4236b4f949532d7d4de0f7322bfc2015f4903611065
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 69550b2d504d19ad7350ef8b35bed031302c15bec267b74bc057b4e253cd44f4bcb04d8884066abdebce9f86b5732c567ad3c747b4c75738ca871c74157be928
|
7
|
+
data.tar.gz: 44a6f8f273e29fc6f6e068b13ea8ed05cb6d89c39c7367bdabc31ae7e2a4e3b058508c1ecbf5d065df6fbc0b875640e81eed778c62fb6844b2af71ca847ad02e
|
data/Gemfile
CHANGED
data/lib/mediainfo.rb
CHANGED
@@ -24,7 +24,8 @@ module MediaInfo
|
|
24
24
|
else
|
25
25
|
mediainfo_location = ENV['MEDIAINFO_PATH']
|
26
26
|
end
|
27
|
-
raise EnvironmentError, "
|
27
|
+
raise EnvironmentError, "MediaInfo binary cannot be found. Are you sure mediainfo is installed?" if which('mediainfo').nil?
|
28
|
+
raise EnvironmentError, "MediaInfo path you provided cannot be found. Please check your mediainfo installation location..." unless ::File.exist? mediainfo_location
|
28
29
|
return mediainfo_location
|
29
30
|
end
|
30
31
|
|
@@ -98,11 +99,9 @@ module MediaInfo
|
|
98
99
|
def self.from_uri(input)
|
99
100
|
http = Net::HTTP.new(input.host, input.port) # Check if input is valid
|
100
101
|
request = Net::HTTP::Head.new(input.request_uri) # Only grab the Headers to be sure we don't try and download the whole file
|
101
|
-
|
102
102
|
http.use_ssl = true if input.is_a? URI::HTTPS # For https support
|
103
|
-
|
104
|
-
raise RemoteUrlError, "HTTP call to #{input} is not working
|
105
|
-
|
103
|
+
http_request = http.request(request)
|
104
|
+
raise RemoteUrlError, "HTTP call to #{input} is not working : #{http_request.value}" unless http_request.is_a?(Net::HTTPOK)
|
106
105
|
MediaInfo::Tracks.new(MediaInfo.run(URI.escape(input.to_s)))
|
107
106
|
end
|
108
107
|
|
data/lib/mediainfo/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mediainfo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Seth Thomas Rasmussen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-03-
|
11
|
+
date: 2019-03-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -83,7 +83,6 @@ files:
|
|
83
83
|
- ".gitignore"
|
84
84
|
- ".rspec"
|
85
85
|
- ".travis.yml"
|
86
|
-
- ".vscode/settings.json"
|
87
86
|
- Changelog
|
88
87
|
- Gemfile
|
89
88
|
- LICENSE
|
@@ -120,7 +119,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
120
119
|
- !ruby/object:Gem::Version
|
121
120
|
version: '1.2'
|
122
121
|
requirements: []
|
123
|
-
rubygems_version: 3.0.
|
122
|
+
rubygems_version: 3.0.3
|
124
123
|
signing_key:
|
125
124
|
specification_version: 3
|
126
125
|
summary: MediaInfo is a class wrapping the mediainfo CLI (http://mediainfo.sourceforge.net)
|