-
Notifications
You must be signed in to change notification settings - Fork 27
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
mb_artistid and mb_albumartistid should be lists #43
Comments
mutagen.File('/home/juniorjpdj/temp/Szpadyzor crew.flac')['MUSICBRAINZ_ARTISTID']
Out[39]:
['164ed128-525d-4798-883f-be13502de86b',
'ded6b91b-26d8-4bc0-8aa9-fab9b54cd157']
mutagen.File('/home/juniorjpdj/temp/ID3v240_Szpadyzor crew.mp3')['TXXX:MusicBrainz Album Artist Id']
Out[40]: TXXX(encoding=<Encoding.UTF8: 3>, desc='MusicBrainz Album Artist Id', text=['164ed128-525d-4798-883f-be13502de86b', 'ded6b91b-26d8-4bc0-8aa9-fab9b54cd157'])
mutagen.File('/home/juniorjpdj/temp/ID3v230_Szpadyzor crew.mp3')['TXXX:MusicBrainz Album Artist Id']
Out[41]: TXXX(encoding=<Encoding.UTF16: 1>, desc='MusicBrainz Album Artist Id', text=['164ed128-525d-4798-883f-be13502de86b/ded6b91b-26d8-4bc0-8aa9-fab9b54cd157']) Main problem is with ID3v2.3 separator not being parsed by mutagen? |
I successfully got results like this with own class for DescList ID3 on MP3: from mediafile import MediaFile
MediaFile('/home/juniorjpdj/temp/ID3v240_Szpadyzor crew.mp3').mb_albumartistid
Out[3]:
['164ed128-525d-4798-883f-be13502de86b',
'ded6b91b-26d8-4bc0-8aa9-fab9b54cd157']
MediaFile('/home/juniorjpdj/temp/ID3v230_Szpadyzor crew.mp3').mb_albumartistid
Out[4]: ['164ed128-525d-4798-883f-be13502de86b/ded6b91b-26d8-4bc0-8aa9-fab9b54cd157']
MediaFile('/home/juniorjpdj/temp/Szpadyzor crew.flac').mb_albumartistid
Out[5]:
['164ed128-525d-4798-883f-be13502de86b',
'ded6b91b-26d8-4bc0-8aa9-fab9b54cd157'] but I still don't know how to handle separator in ID3v2.3 ;/ |
Ah, interesting! Is there any chance that we just need to do the splitting ourselves for ID3v2.3? Or else we could just give up—and say that multiple items are not supported pre-2.4? |
For this fields splitting shouldn't be worst idea actually, data in array elements shouldn't contain any We could add some magic bool argument to I'm just still wondering if there's a way to make |
Indeed—it would only be appropriate to this hack "on our end" for these ID fields, and not in general. I took a look at #21 and, unless I'm misreading something, it sounds like the Mutagen docs say that |
You seem to be right. I'll do this in #42 then ;D |
I'll just hardcode |
fixes rest of problems in beetbox#43 Shouldn't be enabled on tags like `artists` or other without confidence that values will not contain separator (eg. `artists: ['AC/DC']`). Format of mbid is known and I'm sure we can enable it here. When solving beetbox#21 this separator value in `el.split('/')` also should be taken into account.
fixes rest of problems in beetbox#43 Shouldn't be enabled on tags like `artists` or other without confidence that values will not contain separator (eg. `artists: ['AC/DC']`). Format of mbid is known and I'm sure we can enable it here. When solving beetbox#21 this separator value in `el.split('/')` also should be taken into account.
…StorageStyle fixes rest of problems in beetbox#43 Shouldn't be enabled on tags like `artists` or other without confidence that values will not contain separator (eg. `artists: ['AC/DC']`). Format of mbid is known and I'm sure we can enable it here. When solving beetbox#21 this separator value in `el.split('/')` also should be taken into account.
…StorageStyle fixes rest of problems in beetbox#43 Shouldn't be enabled on tags like `artists` or other without confidence that values will not contain separator (eg. `artists: ['AC/DC']`). Format of mbid is known and I'm sure we can enable it here. When solving beetbox#21 this separator value in `el.split('/')` also should be taken into account.
…StorageStyle fixes rest of problems in beetbox#43 Shouldn't be enabled on tags like `artists` or other without confidence that values will not contain separator (eg. `artists: ['AC/DC']`). Format of mbid is known and I'm sure we can enable it here. When solving beetbox#21 this separator value in `el.split('/')` also should be taken into account.
It's gonna get it's own PR - I removed fix from #42 |
Well, ATM it's anyway returning only first id from list eg. when tagged by Picard which is badly broken behaviour. Maybe we could go with something similar to However |
…StorageStyle fixes rest of problems in beetbox#43 Shouldn't be enabled on tags like `artists` or other without confidence that values will not contain separator (eg. `artists: ['AC/DC']`). Format of mbid is known and I'm sure we can enable it here. When solving beetbox#21 this separator value in `el.split('/')` also should be taken into account.
…StorageStyle fixes rest of problems in beetbox#43 Shouldn't be enabled on tags like `artists` or other without confidence that values will not contain separator (eg. `artists: ['AC/DC']`). Format of mbid is known and I'm sure we can enable it here. When solving beetbox#21 this separator value in `el.split('/')` also should be taken into account.
Rebased PR is ready to review. |
Tags are now interpreted as lists. Resolves beetbox#43
Tags are now interpreted as lists. Resolves beetbox#43
Tags are now interpreted as lists. Resolves beetbox#43
Hey!
When trying to fix my PR (#42) I found error I can't fix myself.
mb_artistid
andmb_albumartistid
should be lists!mediafile
's version:Picard is tagging it like that (mutagen dump):
FLAC:
'musicbrainz_artistid': ['164ed128-525d-4798-883f-be13502de86b', 'ded6b91b-26d8-4bc0-8aa9-fab9b54cd157'],
MP3 (ID3v2.3):
'TXXX:MusicBrainz Artist Id': TXXX(encoding=<Encoding.UTF16: 1>, desc='MusicBrainz Artist Id', text=['ca780457-5bf6-4a7d-95fa-0d0d4920f26f/258a67d1-172d-4d16-8d6c-09efde60896f/af262d86-542d-4864-8527-083065166d6c']),
Fixing FLAC parsing is easy I can't make it work in MP3 case.
Current code is returning only the first author in case of FLAC and
'/'
separated string in case of MP3.Helping fixing this will also help me solve some problems with #42 ;D
The text was updated successfully, but these errors were encountered: