Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not explicitly add Part-of-compilation tag to M4A files #53

Open
moubctez opened this issue Sep 29, 2015 · 1 comment
Open

Do not explicitly add Part-of-compilation tag to M4A files #53

moubctez opened this issue Sep 29, 2015 · 1 comment

Comments

@moubctez
Copy link

I noticed that M4A files always have Part-of-compilation ('cpil') tag added and set to 'yes'. In my opition, this is wrong. I am attaching a patch to remove this behaviour. To fix the issue correctly, audio-tools should handle "compilation" metadata for supported audio formats (I think FLAC uses COMPILATION=1). Please, fix. :)

--- audiotools/m4a_atoms.py.orig    2015-09-29 16:42:11.000000000 +0000
+++ audiotools/m4a_atoms.py
@@ -1422,11 +1422,6 @@ class M4A_META_Atom(MetaData, M4A_Tree_A
                     [M4A_ILST_COVR_Data_Atom.converted(
                         metadata.front_covers()[0])]))

-        ilst_atoms.append(
-            M4A_ILST_Leaf_Atom(
-                b'cpil',
-                [M4A_Leaf_Atom(b'data',
-                               b'\x00\x00\x00\x15\x00\x00\x00\x00\x01')]))

         return cls(0, 0, [M4A_HDLR_Atom(0, 0, b'\x00\x00\x00\x00',
                                         b'mdir', b'appl', 0, 0, b'', 0),
@tuffy
Copy link
Owner

tuffy commented Sep 30, 2015

Since the part-of-compilation flag is available in Vorbis comments, ID3v2.2/3/4 and probably APEv2, it may be better to add it as a field in the MetaData class. That'll mean the "cpil" atom gets added only if set in the source metadata instead of (wrongly) all the time like it is now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants