tagomatic 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/tagomatic/format_compiler.rb +1 -1
- data/lib/tagomatic/known_formats.rb +7 -7
- data/lib/tagomatic/scanner.rb +1 -1
- data/lib/tagomatic/tagger.rb +9 -1
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.5
|
@@ -4,40 +4,40 @@ module Tagomatic
|
|
4
4
|
|
5
5
|
KNOWN_FORMATS = [
|
6
6
|
"%g/%a/%b/Disc%d/%n-%t.mp3",
|
7
|
+
"%g/%a/%b/Disc%d/%n.%t.mp3",
|
7
8
|
"%g/%a/%b/Disc%d/%n%t.mp3",
|
8
9
|
"%g/%a/%b/Disc%d/%t.mp3",
|
9
|
-
"%g/%a/%b/CD%d/%n-%t.mp3",
|
10
|
-
"%g/%a/%b/CD%d/%n%t.mp3",
|
11
|
-
"%g/%a/%b/CD%d/%t.mp3",
|
12
10
|
"%g/%a/%b/cd%d/%n-%t.mp3",
|
11
|
+
"%g/%a/%b/cd%d/%n.%t.mp3",
|
13
12
|
"%g/%a/%b/cd%d/%n%t.mp3",
|
14
13
|
"%g/%a/%b/cd%d/%t.mp3",
|
15
14
|
|
16
15
|
"%g/%a/%b[%y]/%a-%b-%n-%t.mp3",
|
17
16
|
"%g/%a/%b[%y]/%n-%t.mp3",
|
17
|
+
"%g/%a/%b[%y]/%n.%t.mp3",
|
18
18
|
"%g/%a/%b[%y]/%n%t.mp3",
|
19
19
|
|
20
20
|
"%g/%a/%b(%y)/%a-%b-%n-%t.mp3",
|
21
21
|
"%g/%a/%b(%y)/%n-%t.mp3",
|
22
|
+
"%g/%a/%b(%y)/%n.%t.mp3",
|
22
23
|
"%g/%a/%b(%y)/%n%t.mp3",
|
23
24
|
|
24
25
|
"%g/%a/(%y)%b/%a-%b-%n-%t.mp3",
|
25
26
|
"%g/%a/(%y)%b/%n-%t.mp3",
|
27
|
+
"%g/%a/(%y)%b/%n.%t.mp3",
|
26
28
|
"%g/%a/(%y)%b/%n%t.mp3",
|
27
29
|
|
28
30
|
"%g/%a/%y - %b/%a-%b-%n-%t.mp3",
|
29
31
|
"%g/%a/%y - %b/%n-%t.mp3",
|
32
|
+
"%g/%a/%y - %b/%n.%t.mp3",
|
30
33
|
"%g/%a/%y - %b/%n%t.mp3",
|
31
34
|
|
32
35
|
"%g/%a/%b/%a-%b-%n-%t.mp3",
|
33
|
-
"%g/%a/%b/%a-%b-%n-%t.MP3",
|
34
36
|
"%g/%a/%b/%n-%t.mp3",
|
35
|
-
"%g/%a/%b/%n
|
37
|
+
"%g/%a/%b/%n.%t.mp3",
|
36
38
|
"%g/%a/%b/%n%t.mp3",
|
37
|
-
"%g/%a/%b/%n%t.MP3",
|
38
39
|
|
39
40
|
"%g/%a/%b/%t.mp3",
|
40
|
-
"%g/%a/%b/%t.MP3",
|
41
41
|
]
|
42
42
|
|
43
43
|
end
|
data/lib/tagomatic/scanner.rb
CHANGED
@@ -65,7 +65,7 @@ module Tagomatic
|
|
65
65
|
def read_local_options
|
66
66
|
local_options = []
|
67
67
|
matcher = @local_options_matcher_factory.create_local_options_matcher
|
68
|
-
lines = File.readlines(determine_local_config_file_path)
|
68
|
+
lines = File.readlines(determine_local_config_file_path).map {|line| line.chomp}
|
69
69
|
lines.each do |line|
|
70
70
|
matcher.process!(line)
|
71
71
|
local_options.concat matcher.to_argv
|
data/lib/tagomatic/tagger.rb
CHANGED
@@ -119,6 +119,8 @@ module Tagomatic
|
|
119
119
|
end
|
120
120
|
|
121
121
|
def normalize_tags
|
122
|
+
return if @tags.nil? or @tags.empty?
|
123
|
+
|
122
124
|
normalized = Hash.new
|
123
125
|
@tags.each do |tag, value|
|
124
126
|
next if value.nil?
|
@@ -153,7 +155,7 @@ module Tagomatic
|
|
153
155
|
apply_tags
|
154
156
|
show_tags if @options[:showtags]
|
155
157
|
ensure
|
156
|
-
|
158
|
+
try_closeing_mp3file
|
157
159
|
end
|
158
160
|
|
159
161
|
def open_mp3file
|
@@ -207,6 +209,12 @@ module Tagomatic
|
|
207
209
|
puts output
|
208
210
|
end
|
209
211
|
|
212
|
+
def try_closeing_mp3file
|
213
|
+
close_mp3file
|
214
|
+
rescue
|
215
|
+
show_error "failed closing #{@file_path} - file probably not updated", $!
|
216
|
+
end
|
217
|
+
|
210
218
|
def close_mp3file
|
211
219
|
@mp3.close
|
212
220
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tagomatic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Lukic
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-11-
|
12
|
+
date: 2009-11-03 00:00:00 +01:00
|
13
13
|
default_executable: tagomatic
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|