summaryrefslogtreecommitdiff
path: root/omptagger
diff options
context:
space:
mode:
Diffstat (limited to 'omptagger')
-rwxr-xr-xomptagger31
1 files changed, 14 insertions, 17 deletions
diff --git a/omptagger b/omptagger
index b6dc1c1..d6d221e 100755
--- a/omptagger
+++ b/omptagger
@@ -89,21 +89,6 @@ class Metadata
puts 'No tags set.'.format(:info)
throw :next
end
- end
-
- def viewtag(tag)
- puts ('Viewing ' + tag + ' tag:').format(:action)
-
- unless @tags.has_key? tag
- puts 'Tag not set.'.format(:info)
- throw :next
- end
- end
-end
-
-class VorbisComment < Metadata
- def view
- super
@tags.sort.each do |tag, val|
val.each do |val|
@@ -113,14 +98,22 @@ class VorbisComment < Metadata
end
def viewtag(tag)
- super
+ puts ('Viewing ' + tag + ' tag:').format(:action)
+
+ unless @tags.has_key? tag
+ puts 'Tag not set.'.format(:info)
+ throw :next
+ end
@tags[tag].each do |val|
- output(tag, val)
+ output(tag, val.to_s)
end
end
end
+class VorbisComment < Metadata
+end
+
class FLAC < VorbisComment
def initialize(file)
super
@@ -146,6 +139,10 @@ class MP3 < Metadata
@file = TagLib::MPEG::File.new(file)
@tags = @file.ID3v2Tag.frameListMap.hash
end
+
+ def output(tag, val, padding = 0)
+ super(tag, val.to_s, padding)
+ end
end
def help