Class: WahWah::ID3::CommentFrameBody
- Defined in:
- lib/wahwah/id3/comment_frame_body.rb
Direct Known Subclasses
Constant Summary
Constants inherited from FrameBody
FrameBody::ENCODING_MAPPING, FrameBody::ENCODING_TERMINATOR_SIZE
Instance Attribute Summary
Attributes inherited from FrameBody
Instance Method Summary collapse
-
#parse ⇒ Object
Comment frame body structure:.
Methods inherited from FrameBody
Constructor Details
This class inherits a constructor from WahWah::ID3::FrameBody
Instance Method Details
#parse ⇒ Object
Comment frame body structure:
Text encoding $xx Language $xx xx xx Short content description <textstring> $00 (00) The actual text <textstring>
12 13 14 15 16 17 18 |
# File 'lib/wahwah/id3/comment_frame_body.rb', line 12 def parse encoding_id, _language, reset_content = @content.unpack("CA3a*") encoding = ENCODING_MAPPING[encoding_id] _description, comment_text = Helper.split_with_terminator(reset_content, ENCODING_TERMINATOR_SIZE[encoding]) @value = Helper.encode_to_utf8(comment_text, source_encoding: encoding) end |