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
year is shown as null in ID3v2.4 tagged file #1
Comments
That's a reasonable request, I agree. I've just pushed some code that should use fallbacks. Here's what I put in the README for it:
I'd appreciate if you test it out and share your thoughts on the order of fallbacks. If you think it makes sense, I'll publish a new minor release. |
Reading works fine! I think the order makes sense. But i wonder if it is legal to write TYER into an id3v2.4 header? The spec doesn't mention it so i guess not? I think it should write into the tag the original value came from. |
Hmm, you're right. The reason it was working when I tested it is because I was writing the tags as v2.3. I've pushed a change that writes the version of the tags that was read, and updating the year no longer works for v2.4. What I think I'll do is only return the year if the version is < 2.4 and return the full date otherwise. Same for writing. It might be best to also expose a |
I've pushed some commit that implement this -- there's a "date" for v2.4 tags and a "year" for 2.3 and 2.2. These seem to be the only versions the rust library handles. If you install the latest git versions of the Vim plugin and the tool, you should be able to edit those consistently. For the date, I've only taken "release date" to avoid mixing things up, now that we've got them separated. Could you (carefully, on copies of music) try this out and let me know if it seems to work as you'd expect? |
It looks like “release date” (TDRL) is not read and written by picard and EasyTag but they use “Recording time” (TDRC) instead¹, so it was a bit tricky to find a suitable file 😊.
Files with no TDRL tag and TDRC instead trigger no error but the date isn't displayed, of course. Both the binary and the plugin were updated ~20 minutes before writing this. ¹ I gathered that by running |
Hm, okay, "release date" was just my assumption, I've pushed a change that uses "recording date". Tested it locally with picard and it does seem like the updates are happening.
That's odd, I just tested it out with neovim and I'm not seeing this. I added some more precise checks, so if and when you see this error, maybe we'll get more context. I also found a dumb bug with comments, which might have affected things, not sure. Either way, could you update both id3-json and id3.vim and give it another shot? |
It works fine with files with “recording date” now but i still get the same error for files with “release date” but without “recording date”.
|
Ah, the error is because of the comment! Both files i tested had |
Hm, I still can't replicate it :/. It seems the json result's
(or whatever the name of the file you're testing with) |
In picard i can add several comments to one file. But that should make it an array in my opinion… 🤔
{
"data": {
"album": "The Butcher's Ballroom",
"artist": "Diablo Swing Orchestra",
"comment": "test\u0000",
"date": null,
"genre": null,
"title": "Balrog Boogie",
"track": 1
},
"version": "ID3v2.4"
}
(the newline is not because of my window size, it's in the output) |
I see now. This is a neovim thing. The help files for
The comment string ends in a nul bytes (that's the I've pushed a new |
Yep, it works now. 🎉 |
Awesome :). I've pushed a new release, 0.2.0, with compiled binaries and everything. With that, I'll close this issue, but please open a new one if you run into more problems. |
id3-json -r 10.\ the\ masochism\ tango.mp3 | jq .
outputs this:while
picard
shows this:It happens with this file: testfile.zip (it's in the public domain)
I'm not very familiar with id3 tags, but the issue appears to be that v2.4 replaced the year tags (
TORY
andTYER
) with time tags (TDOR
andTDRL
). Maybe they should be used if the year tags are not found?The text was updated successfully, but these errors were encountered: