You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Invalid reading when record date is presented #452
Firstly I would like to thank for this great project. Before lofty, I use several different packages to read tags from different formats.
I recently met a problem though.
Don't know when this problem happens, but now more than half of my mp3 are not recognized. I read the same file with tageditor and it's all right. The tags are in ID3V2 format. The only difference is, the unsupported file all have record date presented. When I delete this tag in tageditor, save it, it becomes supported all right by lofty. Is it a known bug or my code is wrong? I didn't use this tag in my code actually.
Summary
Passing of ID3V2 with record date tag is not working.
Expected behavior
It should be able to read all tags.
Assets
I cannot upload mp3 files but you can check this with any mp3 files in termusic. Thanks.
The thing with Lofty is, it will parse timestamps into a Timestamp. This is different from other libraries, which will just return a string.
Timestamp parsing is already setup to handle multiple common encoding errors, but it could be that your file has one I am not aware of. Could you open the file up in a tag editor and send the recording date field here? Or you can email me the asset at serial AT [domain on my profile].
When record date is 4 number it is all right to read by lofty, when record date is 8 digits lofty cannot read it. Wired.
A 4 digit timestamp in ISO 8601 format is just a year, which is perfectly valid (it is the only required field).
Yeah, looks like yt-dlp embeds dates incorrectly for some reason. Your date "20200820" should be "2020-08-20". I'll see if I can easily support that format since yt-dlp audio files are pretty popular.
Activity
tramhao commentedon Sep 4, 2024
Seem a little bit update:
When
record dateis 4 number it is all right to read by lofty, whenrecord dateis 8 digits lofty cannot read it. Wired.Serial-ATA commentedon Sep 4, 2024
Hello!
The thing with Lofty is, it will parse timestamps into a Timestamp. This is different from other libraries, which will just return a string.
Timestamp parsing is already setup to handle multiple common encoding errors, but it could be that your file has one I am not aware of. Could you open the file up in a tag editor and send the recording date field here? Or you can email me the asset at
serial AT [domain on my profile].A 4 digit timestamp in ISO 8601 format is just a year, which is perfectly valid (it is the only required field).
tramhao commentedon Sep 5, 2024
The wrong recording date in tageditor is like this:
The correctly parsed recording date in tageditor is like this:
Or empty is all right. I sent to you a wrongly parsed mp3 by email.
tramhao commentedon Sep 5, 2024
By the way, most of my tags were embeded by yt-dlp(ffmpeg underlying). The recording date should be from youtube.
Serial-ATA commentedon Sep 5, 2024
Yeah, looks like yt-dlp embeds dates incorrectly for some reason. Your date "20200820" should be "2020-08-20". I'll see if I can easily support that format since yt-dlp audio files are pretty popular.
tramhao commentedon Sep 10, 2024
I confirm that the problem is solved by #453. Thanks.