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.
- data/last-dup.gemspec +1 -1
- data/lib/last-dup/album.rb +7 -8
- data/lib/last-dup/version.rb +1 -1
- metadata +4 -4
data/last-dup.gemspec
CHANGED
@@ -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 "
|
26
|
+
spec.add_dependency "id3tag", "~> 0.7.0"
|
27
27
|
spec.add_dependency "configliere", "~> 0.4.18"
|
28
28
|
end
|
data/lib/last-dup/album.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require '
|
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
|
-
|
19
|
-
|
20
|
-
artist =
|
21
|
-
@metadata[:artist] = artist unless artist.
|
22
|
-
album_title =
|
23
|
-
@metadata[:album_title] = album_title unless album_title.
|
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
|
data/lib/last-dup/version.rb
CHANGED
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.
|
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:
|
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.
|
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.
|
77
|
+
version: 0.7.0
|
78
78
|
- !ruby/object:Gem::Dependency
|
79
79
|
name: configliere
|
80
80
|
requirement: !ruby/object:Gem::Requirement
|