Bugzilla – Bug 4927
ID3v2.4 date tags ignored
Last modified: 2007-10-23 12:24:22 UTC
ID3 v2.4 allows for date fields, like TDRC, to look like 2007-04-19. SlimServer looks in TDRC for the album year, but if a track is tagged with a date including month and day, rather than taking the first four digits as the year, it does not process the tag at all. This seems to be due to the code used to fix bug 2610 in Schema.pm; it shouldn't be difficult to recognize a YYYY-MM-DDTHH:MM-style valid ID3v2.4 date and strip out the year before entering it into the database. For reference, here is a description of timestamps allowed by v2.4, from http://www.id3.org/id3v2.4.0-structure : The timestamp fields are based on a subset of ISO 8601. When being as precise as possible the format of a time string is yyyy-MM-ddTHH:mm:ss (year, "-", month, "-", day, "T", hour (out of 24), ":", minutes, ":", seconds), but the precision may be reduced by removing as many time indicators as wanted. Hence valid timestamps are yyyy, yyyy-MM, yyyy-MM-dd, yyyy-MM-ddTHH, yyyy-MM-ddTHH:mm and yyyy-MM-ddTHH:mm:ss. All time stamps are UTC. For durations, use the slash character as described in 8601, and for multiple non- contiguous dates, use multiple strings, if allowed by the frame definition.
Easily reproduced.
Created attachment 1908 [details] patch for Schema.pm, possible fix for this bug Adding this check at line 1592 in Schema.pm (slimserver 6.5.1) seems to fix at least most cases in my collection: if ($attributes->{'YEAR'} && $attributes->{'YEAR'} =~ m/^(\d+)-\d+(-\d+(T\d+(:\d+(:\d+)?)?)?)?$/) { $attributes->{'YEAR'} = $1; } A patch is attached.
I've fixed this in change 14042 for MP3 files.