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
Timestamp parse error makes entire id3 tag unreadable #462
If the timestamp is invalid could it be skipped in relaxed parsing mode?
That was what I originally intended to happen, and completely forgot to implement it. 😄
2015-07-08 16:53:04
I've never seen a timestamp like this before, though (should be "2015-07-08T16:53:04"). Do you know where the file came from? The parser can already handle multiple common spec violations, and this may be one that should be supported if it comes from some popular software/platform.
Besides that though, yeah I do need to fix errors for BestAttempt/Relaxed parsing.
In that case, I don't know if I should include an exception for that mistake. I'll have it just return what it can parse. So 2015-07-08 16:53:04 will just return a timestamp with year, month, day and discard the rest (when not using ParsingMode::Strict).
i also just ran into this (BadTimestamp("Expected a separator")), using the default BestAttempt mode and also trying Relaxed, the value in question (to my knowledge, the only one in the file ffmpeg shows): TYER : 20180923
this value comes from a old version of yt-dl (like 2021 or before)
(mp3 file, only concerning the id3v2 frame, not id3v1)
the git version (as of 4a2bcf5) does not error out, but also does not parse the timestamp
log::warn!("TYER frame is not a timestamp frame, retaining.");
tag.insert(year_frame);
return;
};
// This is not a TYER frame
if year_frame.timestamp.month.is_some(){
return;
}
Right now, when upgrading ID3v2.3 to ID3v2.4 I have a check to discard the frame if it isn't actually a valid TYER. I guess I could ignore it for BestAttempt/Relaxed, never seen this before.
Dates without separators should be supported since I fixed #452 (not published yet).
I haven't had much time to work on Lofty lately, I'd like to get #218 in before getting 0.22.0 released, since it'll probably be my last major update for a bit.
Related to that, if you could help test that PR at all it'd be much appreciated. See #218 (comment)
Dates without separators should be supported since I fixed #452 (not published yet).
sorry, didnt re-test with the git version; can confirm that the TDRC is correctly parsed there, though the TYER is still not present (i guess to be expected as its invalid - at least in the id3v2 section).
Activity
Serial-ATA commentedon Sep 15, 2024
That was what I originally intended to happen, and completely forgot to implement it. 😄
I've never seen a timestamp like this before, though (should be "2015-07-08T16:53:04"). Do you know where the file came from? The parser can already handle multiple common spec violations, and this may be one that should be supported if it comes from some popular software/platform.
Besides that though, yeah I do need to fix errors for
BestAttempt/Relaxedparsing.milesegan commentedon Sep 15, 2024
I’ll try to find out the origin. A user sent it to me.
milesegan commentedon Sep 15, 2024
Unfortunately I don’t know the origin of this file. I’m not sure if it’s likely to be a common occurrence.
Serial-ATA commentedon Sep 15, 2024
In that case, I don't know if I should include an exception for that mistake. I'll have it just return what it can parse. So
2015-07-08 16:53:04will just return a timestamp with year, month, day and discard the rest (when not usingParsingMode::Strict).milesegan commentedon Sep 15, 2024
That sounds like a perfectly reasonable best effort result. Thanks for taking a look at it!
hasezoey commentedon Oct 28, 2024
i also just ran into this (
BadTimestamp("Expected a separator")), using the defaultBestAttemptmode and also tryingRelaxed, the value in question (to my knowledge, the only one in the file ffmpeg shows):TYER : 20180923this value comes from a old version of yt-dl (like 2021 or before)
(mp3 file, only concerning the id3v2 frame, not id3v1)
the git version (as of 4a2bcf5) does not error out, but also does not parse the timestamp
Serial-ATA commentedon Oct 28, 2024
Hello @hasezoey!
That's not a valid
TYERframe, it should contain only the year. In ID3v2.3, you should have a combination ofTYER(year) +TDAT(day/month).lofty-rs/lofty/src/id3/v2/read.rs
Lines 62 to 71 in 4a2bcf5
Right now, when upgrading ID3v2.3 to ID3v2.4 I have a check to discard the frame if it isn't actually a valid
TYER. I guess I could ignore it forBestAttempt/Relaxed, never seen this before.hasezoey commentedon Oct 28, 2024
on newer versions of yt-dl(p) it is replaced with the
TDRCtag, a reproduction can be done with:(PS: one of my uploaded videos)
this also currently triggers the lofty error.
i dont actually care that much about that tag, only really came here because of the whole probe failing, but wanted to provide more information.
Serial-ATA commentedon Oct 28, 2024
Dates without separators should be supported since I fixed #452 (not published yet).
I haven't had much time to work on Lofty lately, I'd like to get #218 in before getting 0.22.0 released, since it'll probably be my last major update for a bit.
Related to that, if you could help test that PR at all it'd be much appreciated. See #218 (comment)
hasezoey commentedon Oct 28, 2024
sorry, didnt re-test with the git version; can confirm that the
TDRCis correctly parsed there, though theTYERis still not present (i guess to be expected as its invalid - at least in the id3v2 section).