dragonfly_audio 1.0.3 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7358381b3e93d63f3fcab85483e44f0b05bc0fb6557aa1f47f944e2b092a6f11
4
- data.tar.gz: 9e16191e41135220edfb04acf272ff5ca13380bfe5ae354237e44b14c86014b5
3
+ metadata.gz: 1eb56e753d688f9144b32a2d2d217a6c7bed3f434da06686ee5ed85d183903bc
4
+ data.tar.gz: 0323dccb3b593be0f3762d1113bbf9f882f87afa0f5f323b84b3f329a03b3f21
5
5
  SHA512:
6
- metadata.gz: 4974325e79c595e391e37fa6ed59756cb01ee684fae7d0ae7b18741cb584988ba3e754c3d795ab310bd784b2ecfb64e0dfd9ff47950141fced5ffd8d65a95ba8
7
- data.tar.gz: 1db36d1b74d56dc8bb1453544c28ad3bab6ce80d08a90d69523c958c510f6c00af4ef7a1e372a525fa54bd4722d2461b639263a54037ddc35ce052cb40951f56
6
+ metadata.gz: ba48651964dce80fe6e5b868e5595b12c02507ddef4875fff176e6691d1425241d097a4ccfebc4c8c3de5e90416a5c4bb98a5a71978072af43704bc0c86e0a9a
7
+ data.tar.gz: d8a55c4ecff008ed0c1f61cb0e43aba71fceaaa8eead90b0bb2d0542fe5adeec821da9d5b194ae198f2fc87d38bbfd9dead95672f2a84ae17e21e54939ef0c14
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 1.1.0
4
+
5
+ - support `taglib-ruby` `1.0` – [@asgerb](https://github.com/asgerb).
6
+ - added `length_in_seconds` and `length_in_milliseconds` to `AudioProperties` – [@asgerb](https://github.com/asgerb).
7
+
3
8
  ## 1.0.3
4
9
 
5
10
  - locked `taglib-ruby` to `~> 0.7.1` – [@asgerb](https://github.com/asgerb).
data/README.md CHANGED
@@ -58,6 +58,8 @@ audio.audio_properties
58
58
  # genre: 'Ambient',
59
59
  # comment: 'This Music was originally composed for "The Memory Theatre of Gulio Camillo" by Matthew Maguire. A Creation production premiered at La Mama Spring 1985 thanks to Bonnie for not laughing to Justin for laughing to Jon Gordron for electronic bondage produced by Jonathan Mann for Pangea Productions recorded 8/85 at Chiens Interdits Studio in a big cover production by Ann Rower cover design by Paul Leone * all compositions by Vito Ricci * play it loud',
60
60
  # length: 345,
61
+ # length_in_seconds: 345,
62
+ # length_in_milliseconds: 345000,
61
63
  # bitrate: 192,
62
64
  # channels: 2,
63
65
  # sample_rate: 44_100
@@ -6,7 +6,7 @@ module DragonflyAudio
6
6
  module Analysers
7
7
  class AudioProperties
8
8
  TAGS = %w[title artist album year track genre comment].freeze
9
- AUDIO_PROPS = %w[length bitrate channels sample_rate].freeze
9
+ AUDIO_PROPS = %w[length_in_seconds length_in_milliseconds bitrate channels sample_rate].freeze
10
10
 
11
11
  def call(content)
12
12
  return {} unless content.ext
@@ -19,6 +19,8 @@ module DragonflyAudio
19
19
  TAGS.each { |n| res[n] = fileref.tag.send(n) }
20
20
  AUDIO_PROPS.each { |n| res[n] = fileref.audio_properties.send(n) }
21
21
  end
22
+
23
+ res["length"] = res["length_in_seconds"]
22
24
 
23
25
  res
24
26
  end
@@ -1,3 +1,3 @@
1
1
  module DragonflyAudio
2
- VERSION = '1.0.3'.freeze
2
+ VERSION = '1.1.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dragonfly_audio
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tomas Celizna
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-06-18 00:00:00.000000000 Z
12
+ date: 2021-04-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: dragonfly
@@ -31,14 +31,14 @@ dependencies:
31
31
  requirements:
32
32
  - - "~>"
33
33
  - !ruby/object:Gem::Version
34
- version: 0.7.1
34
+ version: '1.0'
35
35
  type: :runtime
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
39
  - - "~>"
40
40
  - !ruby/object:Gem::Version
41
- version: 0.7.1
41
+ version: '1.0'
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: bundler
44
44
  requirement: !ruby/object:Gem::Requirement