From 0e42e37a43a0a573c79946b7c918f2b8e5fe0339 Mon Sep 17 00:00:00 2001 From: David Vazgenovich Shakaryan Date: Fri, 15 Oct 2010 18:56:04 -0700 Subject: Begin MP3 support. --- omptagger | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/omptagger b/omptagger index 65284fa..b6dc1c1 100755 --- a/omptagger +++ b/omptagger @@ -139,6 +139,15 @@ class Vorbis < VorbisComment end end +class MP3 < Metadata + def initialize(file) + super + + @file = TagLib::MPEG::File.new(file) + @tags = @file.ID3v2Tag.frameListMap.hash + end +end + def help puts <<-end Usage: omptagger [actions/options] [files] @@ -259,6 +268,8 @@ ARGV.each do |file| track = FLAC.new(file) when 'application/ogg' track = Vorbis.new(file) + when 'audio/mpeg' + track = MP3.new(file) else raise 'File extension not recognised.' end -- cgit v1.2.3-70-g09d2