From 8fa8278f79c023e9bba8324b08b990e71e4bed36 Mon Sep 17 00:00:00 2001 From: David Vazgenovich Shakaryan Date: Fri, 8 Oct 2010 22:44:38 -0700 Subject: Add ability to view a single tag. --- omptagger | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'omptagger') diff --git a/omptagger b/omptagger index 2dcaef9..4397591 100755 --- a/omptagger +++ b/omptagger @@ -27,7 +27,7 @@ class VorbisComment < Metadata puts ' Viewing tags:' if @tags.empty? - puts ' No tags are set.' + puts ' No tags set.' return end @@ -37,6 +37,19 @@ class VorbisComment < Metadata end end end + + def viewtag(tag) + puts ' Viewing ' + tag + ' tag:' + + unless @tags.has_key? tag + puts ' Tag not set.' + return + end + + @tags[tag].each do |val| + output(tag, val) + end + end end class FLAC < VorbisComment -- cgit v1.2.3-70-g09d2