diff --git a/CHANGELOG.md b/CHANGELOG.md index e53632e..0e26736 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ This project adheres to [Semantic Versioning](https://semver.org). * ``OggOpus``. * ``OggOpusVorbisComments``. * ``AudioMetadataWarning``. +* ``ID3v2BinaryDataFrame``. ### Changed diff --git a/src/audio_metadata/formats/id3v2_frames.py b/src/audio_metadata/formats/id3v2_frames.py index 922f773..ae31dd4 100644 --- a/src/audio_metadata/formats/id3v2_frames.py +++ b/src/audio_metadata/formats/id3v2_frames.py @@ -2,6 +2,7 @@ __all__ = [ 'ID3v2BaseFrame', + 'ID3v2BinaryDataFrame', 'ID3v2Comment', 'ID3v2CommentFrame', 'ID3v2Frame', @@ -111,6 +112,14 @@ class ID3v2BaseFrame(AttrMapping): id = attrib() # noqa +@attrs( + repr=False, + kw_only=True, +) +class ID3v2BinaryDataFrame(AttrMapping): + value = attrib() + + @attrs( repr=False, kw_only=True, @@ -513,7 +522,9 @@ def load(cls, data, struct_pattern, size_len, per_byte): # TODO: Move logic into frame classes? kwargs = {'id': frame_id} - if frame_type is ID3v2CommentFrame: + if frame_type is ID3v2BinaryDataFrame: + kwargs['value'] = frame_data + elif frame_type is ID3v2CommentFrame: encoding = determine_encoding(frame_data[0:1]) values = split_encoded(frame_data[4:], encoding)