diff options
-rwxr-xr-x | omptagger | 31 |
1 files changed, 14 insertions, 17 deletions
@@ -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 |