last-dup 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -23,6 +23,6 @@ Gem::Specification.new do |spec|
23
23
  spec.add_development_dependency "bundler", "~> 1.5"
24
24
  spec.add_development_dependency "rake"
25
25
  spec.add_dependency "lastfm", "~> 1.23.0"
26
- spec.add_dependency "mp3info", "~> 0.6.18"
26
+ spec.add_dependency "id3tag", "~> 0.7.0"
27
27
  spec.add_dependency "configliere", "~> 0.4.18"
28
28
  end
@@ -1,4 +1,4 @@
1
- require 'mp3info'
1
+ require 'id3tag'
2
2
 
3
3
  module LastDup
4
4
 
@@ -12,15 +12,14 @@ module LastDup
12
12
  grab_metadata!
13
13
  end
14
14
 
15
-
16
15
  def grab_metadata!()
17
16
  @metadata = {}
18
- Mp3Info.open(@album_proxy_file) do |proxy_file|
19
- break unless proxy_file.hastag?
20
- artist = proxy_file.tag.artist
21
- @metadata[:artist] = artist unless artist.nil?
22
- album_title = proxy_file.tag.album
23
- @metadata[:album_title] = album_title unless album_title.nil?
17
+ File.open(@album_proxy_file) do |file|
18
+ id3_tag = ID3Tag::read file
19
+ artist = id3_tag.artist
20
+ @metadata[:artist] = artist unless artist.empty?
21
+ album_title = id3_tag.album
22
+ @metadata[:album_title] = album_title unless album_title.empty?
24
23
  end
25
24
  @metadata
26
25
  end
@@ -1,3 +1,3 @@
1
1
  module LastDup
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: last-dup
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -60,13 +60,13 @@ dependencies:
60
60
  - !ruby/object:Gem::Version
61
61
  version: 1.23.0
62
62
  - !ruby/object:Gem::Dependency
63
- name: mp3info
63
+ name: id3tag
64
64
  requirement: !ruby/object:Gem::Requirement
65
65
  none: false
66
66
  requirements:
67
67
  - - ~>
68
68
  - !ruby/object:Gem::Version
69
- version: 0.6.18
69
+ version: 0.7.0
70
70
  type: :runtime
71
71
  prerelease: false
72
72
  version_requirements: !ruby/object:Gem::Requirement
@@ -74,7 +74,7 @@ dependencies:
74
74
  requirements:
75
75
  - - ~>
76
76
  - !ruby/object:Gem::Version
77
- version: 0.6.18
77
+ version: 0.7.0
78
78
  - !ruby/object:Gem::Dependency
79
79
  name: configliere
80
80
  requirement: !ruby/object:Gem::Requirement