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

can't get comment field values... #21

Open
Maiky-R opened this issue Aug 23, 2021 · 4 comments
Open

can't get comment field values... #21

Maiky-R opened this issue Aug 23, 2021 · 4 comments

Comments

@Maiky-R
Copy link

Maiky-R commented Aug 23, 2021

for the first, accept my thank for your lib! it's the best

only one thing is upsetting..
maybe I do something wrong, but my program can't get info from comment fields

it returns empty line
so that I need to use another lib (TinyTag) and it's not really professional

I compared tag mapping for comment and it matched

I tested on the same files
and TinyTag lib gets comment value, music_tag doesn't

please, can you help with that.... ?

here is the link for 5 files (as an example)
https://yadi.sk/d/dONCP2vSD-nT4g
please, check them for confirm the problem....

@Maiky-R
Copy link
Author

Maiky-R commented Aug 24, 2021

TinyTag have "COMM" and "COM" tag mapping for comment field
I added "COM" to strings in ID3.py
'comment': TAG_MAP_ENTRY(getter=('COMM', 'COM'), setter='COMM', type=str),
for TAG_MAP_ID3_2_4 and TAG_MAP_ID3_2_3

but it changes nothing (

when I insert values into comment field, as a result I see something like that
BXD0G2100001; Sony Music Entertainment

before ; = old value (that I can't get using music_tag lib)
after ; = new value that I just inserted (using music_tag lib)

I mean I can't rewrite this field totally
remains the old value, that likely stores somewhere in frames..
and I don't understand how to catch old value and rewrite it (using music_tag)

@KristoforMaynard
Copy link
Owner

Unfortunately, I still don't have a good handle on ID3 tags since so many apps encode data into them differently. I think the best thing I can recommend is for you to take a look at file.mfile.tags.keys() and file.mfile.tags.getall('COMM'), etc. If you can think of a more natural way to work with tags from your audio app or music source, I'm happy to discuss changing the interface to mp3 / ID3 files.

@Maiky-R
Copy link
Author

Maiky-R commented Sep 6, 2021

it's a strange thing
now I've tested what you've suggested
and after that your lib started to return me normal value fo comment field

but it's still can't rewrite the whole filed with new value
result is: test; USUM72116311
where "test" what I've just inserted

@Maiky-R
Copy link
Author

Maiky-R commented Sep 6, 2021

kind of solution:
to add into id3.py
'comment2': TAG_MAP_ENTRY(getter='TXXX', setter='TXXX', type=str),

and use it when basic common request 'COMM' returns empty string

get the value using: 'TXXX',
then rewrite 'TXXX' with empty string
and then write new value to basic comment field 'COMM'

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