mediainfo 1.4.0 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8ba6d597d350f1e86fcf13e98ec8a925e24cbe6026c2909526e75f6513a39d68
4
- data.tar.gz: 9906da45c626da23b38e19d8d19267cb4e68dc298ec33f1fbf5ab4ae99909137
3
+ metadata.gz: 065c7f90befa0eb7259e1a804f906436c9eeea316b456cb15acb96ffb853eb73
4
+ data.tar.gz: d78a88f13eec40a22e62a63889fdf1221d72a77980d9a517616e93514030a259
5
5
  SHA512:
6
- metadata.gz: 73fb2c9847fb4e24deff6723cfd983ffd798b6aef82dc04015cd08b7eca95e5fb167c6a19ac50f431fed46abff0a049e65276127ccaba7d26539bb1341801ecb
7
- data.tar.gz: c8f3db15851dad15a5b08b6cc06b7b9d3eba55410734765aa33a0f7e857e734392af3f1cc280429f5e4a26e5993ce38a95b432287d2f47ee1b99e3271f048250
6
+ metadata.gz: e384cc2ec918b16e0ee7acf7605be9fb685b1fcc6aa9105bcceef06c863ca2e192959a43e14f78d21492c77052e14adb7b6d2e77c8fbfb8439096506d8273f47
7
+ data.tar.gz: e29af6e586f2677c11005b0e89fba717446f598969e9c372053dd6c0197aa8095c979a670a2e496b0c9950889341208c941811a7c90bb265bbc74e47dc7fb7a5
data/README.md CHANGED
@@ -60,8 +60,18 @@ Sometimes you'll have more than one track of a given type:
60
60
  - Any track attribute name with "date" and matching /\d-/ will be converted using Time.parse:
61
61
 
62
62
 
63
- media_info.video.encoded_date => 2018-03-30 12:12:08 -0400
64
- media_info.video.customdate => 2016-02-10 01:00:00 -0600
63
+ media_info.video.encoded_date => 2018-03-30 12:12:08 UTC
64
+ media_info.video.customdate => 2016-02-10 01:00:00 UTC
65
+
66
+ > 🕑 **A note on time zones:**
67
+ > Whenever possible, mediainfo provides timestamps in UTC.
68
+ > To convert UTC timestamps to your system time zone, use `#getlocal`:
69
+ >
70
+ > media_info.video.encoded_date.getlocal => 2018-03-30 05:12:08 -0700
71
+ >
72
+ > If a `*date` attribute is already in your local time zone,
73
+ > that means no time zone data was found,
74
+ > and the given time zone may not be correct.
65
75
 
66
76
  - .duration and .overall_duration will be returned as milliseconds AS LONG AS the Duration and Overall_Duration match one of the expected units (each separated by a space or not):
67
77
  - h (\<Duration>15h\</Duration>) (hour)
@@ -127,18 +137,30 @@ a variety of information about a file. Some attributes may be present
127
137
  for some files where others are not, but any supported attribute
128
138
  should at least return `nil`.
129
139
 
140
+
141
+ ## Development
142
+
143
+ ```shell
144
+ bundle install
145
+ irb -I ./lib -r mediainfo
146
+ irb(main):002:0> ::MediaInfo.location
147
+ => "/usr/local/bin/mediainfo"
148
+ ```
149
+
150
+ ### Testing
151
+
152
+ ```shell
153
+ bundle exec rspec
154
+ ```
155
+
130
156
  ## Requirements
131
157
 
132
158
  * Gem version 1.0.0 has been tested on v18.03.1
133
159
  * Gem versions < 1.0.0 require at least: MediaInfoLib v0.7.25
134
160
  * Gem versions <= 0.5.1 worked against MediaInfoLib v0.7.11, which did not generate XML output, and is no longer supported.
135
161
 
136
- ## Contributors
162
+ ## TODO
137
163
 
138
- * Seth Thomas Rasmussen -
139
- [http://github.com/greatseth](http://github.com/greatseth)
140
- * Peter Vandenberk - [http://github.com/pvdb](http://github.com/pvdb)
141
- * Ned Campion - [http://github.com/nedcampion](http://github.com/nedcampion)
142
- * Daniel Jagszent - [http://github.com/d--j](http://github.com/d--j)
143
- * Robert Mrasek - [http://github.com/derobo](http://github.com/derobo)
144
- * Nathan Pierce - [http://github.com/NorseGaud](http://github.com/NorseGaud)
164
+ - Use github actions to test
165
+ - Replace URI.escape cause it's EOL
166
+ - Mocks/Stubs for AWS code? Maybe just disable the tests instead and only test when changing the code?
File without changes
data/lib/mediainfo.rb CHANGED
@@ -89,7 +89,7 @@ module MediaInfo
89
89
 
90
90
  def self.run(input = nil)
91
91
  raise ArgumentError, 'Your input cannot be blank.' if input.nil?
92
- command = "#{location} '#{input}' --Output=XML"
92
+ command = "#{location} \"#{input}\" --Output=XML"
93
93
  raw_response, errors, status = Open3.capture3(command)
94
94
  unless status.exitstatus == 0
95
95
  raise ExecutionError, "Execution of '#{command}' failed: \n #{errors.red}"
@@ -109,7 +109,7 @@ module MediaInfo
109
109
  return value.to_f
110
110
  elsif name.downcase.include?('date') && !value.match(/\d-/).nil?
111
111
  # Dates
112
- return Time.parse(value)
112
+ return Time.parse(value.sub(/^UTC\s+(.*)$/, '\1 UTC'))
113
113
  end
114
114
 
115
115
  value
@@ -1,3 +1,3 @@
1
1
  module MediaInfo
2
- VERSION = '1.4.0'
2
+ VERSION = '1.5.0'
3
3
  end
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.4.0
4
+ version: 1.5.0
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-12-18 00:00:00.000000000 Z
11
+ date: 2021-05-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -110,12 +110,12 @@ extra_rdoc_files: []
110
110
  files:
111
111
  - ".gitignore"
112
112
  - ".rspec"
113
- - ".travis.yml"
114
113
  - Changelog
115
114
  - Gemfile
116
115
  - LICENSE
117
116
  - README.md
118
117
  - Rakefile
118
+ - disabled.travis.yml
119
119
  - lib/attribute_standardization_rules.yml
120
120
  - lib/mediainfo.rb
121
121
  - lib/mediainfo/errors.rb
@@ -147,7 +147,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
147
147
  - !ruby/object:Gem::Version
148
148
  version: '1.2'
149
149
  requirements: []
150
- rubygems_version: 3.1.1
150
+ rubygems_version: 3.1.4
151
151
  signing_key:
152
152
  specification_version: 3
153
153
  summary: MediaInfo is a class wrapping the mediainfo CLI (http://mediainfo.sourceforge.net)