summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2010-10-08 22:44:38 -0700
committerDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2010-10-08 22:44:38 -0700
commit8fa8278f79c023e9bba8324b08b990e71e4bed36 (patch)
tree2231145db8ff3a2a6fd83d672052fe7c152b15f3
parent90811308a55fda3131dbfe5fb749906457dcfb13 (diff)
downloadomptagger-8fa8278f79c023e9bba8324b08b990e71e4bed36.tar.gz
omptagger-8fa8278f79c023e9bba8324b08b990e71e4bed36.tar.xz
Add ability to view a single tag.
-rwxr-xr-xomptagger15
1 files changed, 14 insertions, 1 deletions
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