diff options
author | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2010-10-15 18:56:04 -0700 |
---|---|---|
committer | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2010-10-15 18:56:04 -0700 |
commit | 0e42e37a43a0a573c79946b7c918f2b8e5fe0339 (patch) | |
tree | 26b4b066cff2690f952c9557cc211719ee1c1967 | |
parent | b17056ac17fd9762d64163ee0f919ff46fd6b5bb (diff) | |
download | omptagger-0e42e37a43a0a573c79946b7c918f2b8e5fe0339.tar.gz omptagger-0e42e37a43a0a573c79946b7c918f2b8e5fe0339.tar.xz |
Begin MP3 support.
-rwxr-xr-x | omptagger | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -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 |