Class: TagLib::Ogg::XiphComment
Overview
Xiph comments (aka VorbisComment), a metadata format used for Ogg Vorbis and other codecs.
A Xiph comment is structured as a set of fields. Each field has a name and a value. Multiple fields with the same name are allowed, so you can also view it as a map from names to a list of values.
Instance Attribute Summary collapse
-
#vendor_id ⇒ String
readonly
Vendor ID of the encoder used.
Attributes inherited from Tag
#album, #artist, #comment, #genre, #title, #track, #year
Class Method Summary collapse
-
.check_key(key) ⇒ Boolean
True if the specified string is a valid Xiph comment key.
Instance Method Summary collapse
-
#add_field(name, value, replace = true) ⇒ void
Add a name-value pair to the comment.
-
#add_picture(picture) ⇒ void
Add a picture.
-
#contains?(name) ⇒ Boolean
Check if the comment contains a field.
-
#field_count ⇒ Integer
Count the number of fields (including the pictures).
-
#field_list_map ⇒ Hash<String, Array<String>>
Get the contents of the comment as a hash, with the key being a field name String and the value a list of field values for that key.
-
#picture_list ⇒ Array<TagLib::FLAC::Picture>
The list of the pictures associated to this comment.
-
#remove_all_fields ⇒ Object
Remove all the fields.
-
#remove_all_pictures ⇒ void
Remove all the pictures.
-
#remove_fields ⇒ void
Remove one or more fields.
-
#remove_picture(picture) ⇒ void
Remove a picture.
Methods inherited from Tag
Instance Attribute Details
#vendor_id ⇒ String (readonly)
Returns vendor ID of the encoder used.
113 114 115 |
# File 'docs/taglib/ogg.rb', line 113 def vendor_id @vendor_id end |
Class Method Details
.check_key(key) ⇒ Boolean
Returns True if the specified string is a valid Xiph comment key.
80 81 |
# File 'docs/taglib/ogg.rb', line 80 def self.check_key(key) end |
Instance Method Details
#add_field(name, value, replace = true) ⇒ void
This method returns an undefined value.
Add a name-value pair to the comment.
20 21 |
# File 'docs/taglib/ogg.rb', line 20 def add_field(name, value, replace=true) end |
#add_picture(picture) ⇒ void
This method returns an undefined value.
Add a picture.
94 95 |
# File 'docs/taglib/ogg.rb', line 94 def add_picture(picture) end |
#contains?(name) ⇒ Boolean
Check if the comment contains a field.
27 28 |
# File 'docs/taglib/ogg.rb', line 27 def contains?(name) end |
#field_count ⇒ Integer
Count the number of fields (including the pictures).
33 34 |
# File 'docs/taglib/ogg.rb', line 33 def field_count end |
#field_list_map ⇒ Hash<String, Array<String>>
Get the contents of the comment as a hash, with the key being a field name String and the value a list of field values for that key. Example result:
{ 'TITLE' => ["Title"],
'GENRE' => ["Rock", "Pop"] }
Note that the returned hash is read-only. Changing it will have no effect on the comment; use #add_field and #remove_fields for that.
49 50 |
# File 'docs/taglib/ogg.rb', line 49 def field_list_map end |
#picture_list ⇒ Array<TagLib::FLAC::Picture>
Returns The list of the pictures associated to this comment.
86 87 |
# File 'docs/taglib/ogg.rb', line 86 def picture_list end |
#remove_all_fields ⇒ Object
Remove all the fields.
74 75 |
# File 'docs/taglib/ogg.rb', line 74 def remove_all_fields end |
#remove_all_pictures ⇒ void
This method returns an undefined value.
Remove all the pictures.
109 110 |
# File 'docs/taglib/ogg.rb', line 109 def remove_all_pictures end |
#remove_field(name) ⇒ void #remove_field(name, value) ⇒ void
This method returns an undefined value.
Remove one or more fields.
68 69 |
# File 'docs/taglib/ogg.rb', line 68 def remove_fields end |
#remove_picture(picture) ⇒ void
This method returns an undefined value.
Remove a picture.
102 103 |
# File 'docs/taglib/ogg.rb', line 102 def remove_picture(picture) end |