Skip to content

Commit

Permalink
Add support for ID3v2.2 audio encryption frame [#22]
Browse files Browse the repository at this point in the history
  • Loading branch information
thebigmunch committed Apr 10, 2020
1 parent 1856cd7 commit 26c70ce
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ This project adheres to [Semantic Versioning](https://semver.org).
* ``ID3v2PopularimeterFrame``.
* ``ID3v2PodcastFrame``.
* Support for Apple ``GRP1`` and ``TCAT`` ID3v2 frames.
* ``ID3v2AENCFrame``.
* ``ID3v2AudioEncryptionFrame``.
* Support for ID3v2 play counter frames.
* ``ID3v2PlayCounterFrame``.

Expand Down
13 changes: 6 additions & 7 deletions src/audio_metadata/formats/id3v2frames.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# http://id3.org/Developer%20Information

__all__ = [
'ID3v2AENCFrame',
'ID3v2APICFrame',
'ID3v2AudioEncryption',
'ID3v2AudioEncryptionFrame',
'ID3v2BinaryDataFrame',
'ID3v2Comment',
'ID3v2CommentFrame',
Expand Down Expand Up @@ -553,7 +553,7 @@ class ID3v2BinaryDataFrame(ID3v2Frame):
repr=False,
kw_only=True,
)
class ID3v2AENCFrame(ID3v2Frame):
class ID3v2AudioEncryptionFrame(ID3v2Frame):
@datareader
@staticmethod
def _parse_frame_data(data):
Expand Down Expand Up @@ -1452,17 +1452,15 @@ def _parse_frame_data(data):


# TODO:ID3v2.2
# TODO: BUF, CRA, CRM, ETC, EQU, LNK, MCI, MLL,
# TODO: REV, RVA
# TODO: BUF, CRM, ETC, EQU, LNK, MCI, MLL, REV, RVA

# TODO: ID3v2.3
# TODO: COMR, ENCR, EQUA, ETCO, LINK, MLLT
# TODO: POSS, RBUF, RGAD, RVAD, RVRB, XRVA

# TODO: ID3v2.4
# TODO: ASPI, COMR, ENCR, EQU2, ETCO, LINK, MLLT,
# TODO: POSS, RBUF, RGAD, RVA2, RVRB,
# TODO: SEEK, SIGN, XRVA
# TODO: POSS, RBUF, RGAD, RVA2, RVRB, SEEK, SIGN, XRVA
ID3v2FrameTypes = {
# Binary data frames
'PCS': ID3v2BinaryDataFrame,
Expand All @@ -1472,11 +1470,12 @@ def _parse_frame_data(data):
'PCST': ID3v2BinaryDataFrame,

# Complex binary data frames
'CRA': ID3v2AudioEncryptionFrame,
'GEO': ID3v2GeneralEncapsulatedObjectFrame,
'STC': ID3v2SynchronizedTempoCodesFrame,
'UFI': ID3v2UniqueFileIdentifierFrame,

'AENC': ID3v2AENCFrame,
'AENC': ID3v2AudioEncryptionFrame,
'GEOB': ID3v2GeneralEncapsulatedObjectFrame,
'GRID': ID3v2GRIDFrame,
'PRIV': ID3v2PrivateFrame,
Expand Down

0 comments on commit 26c70ce

Please sign in to comment.