This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#6501 - DataBase does not recognise Year tag in OGG files
|
DetailsI noticed (using a custom_tagnavi file selecting by year) that I had a lot of tracks listed with a year of "0". As all my music is well tagged, I was looking for some differentiation as to which ones were causing the problem.
My tracks are a roughly 70/30 mixture of .ogg and .mp3, with varied bitrates from different sources and ripped/tagged with different applications. I re-initialised the database and then set up two simple tagnavi selections, one for all tracks with Year == "0" and one for all tracks with Year != "0". To my surprise, it neatly divided my entire music collection into .ogg in the Year == "0" playlist and .mp3 in the Year != "0" playlist. It appears, therefore, that the DataBase initilisation does not correctly read the year tag from .ogg files. |
This task depends upon
Closed by Dan Everton (safetydan)
Monday, 05 March 2007, 10:29 GMT+2
Reason for closing: Fixed
Additional comments about closing: Fix committed.
Monday, 05 March 2007, 10:29 GMT+2
Reason for closing: Fixed
Additional comments about closing: Fix committed.
On tag search menu the year tag is always displayed as 0. I created an entry in tagnavi.config to search for tracknum tag between a certain range and this is working successfully. The Tracknum tags are being displayed as tag filter.
AFAIK all vorbis comments are stored as unicode strings. The correct year tag is not being used in tagtree.c
'We are not going to try and parse the vorbis datetime field because it's a string rather than an integer and could concievably contain anything'
MP3's, on the other hand, have both types available, so the Database reads the integer version.
Interestingly (but off topic) the WPS and ID3 Viewer screens show the string version of the MP3 datetime: http://forums.rockbox.org/index.php?topic=9022.msg69580#msg69580
I commented out lines 223, 224 and 226 in metadata.c and compiled it for rockbox simulator. The year tag works for OGG files as per attached screenshot.
Could the if statement in line 223 if (type != TAGTYPE_VORBIS) be changed to check length of string is 4?
I only have a basic knowledge of C and have only had experience of writing basic python scripts but will look into this later.
I amended the tagnavi.config file as below:
"Year" -> year -> artist -> album -> title = "fmt_title"
I set the date tag on an OGG file using the following command:
vorbiscomment -w -t "DATE=200" 09-Heroin.ogg
For testing I used to the following data:
XXXX
2001
X001
2X01
20X1
200X
2001-01-01
200
In each test, I amended the ogg year tag, ran the simulator, re-iniatilsed the database, then used the year search option.
For each test, the OGG file was always displayed as 0 year in tag search expect 2001-01-01 which was displayed as 2001.
I think this approach is better than trying to parse the year out of the date tag or complicating the database by adding another string field.
The tagging application I use would not allow me to enter the year tag anything other than a 4 digit number and had to do testing using a CLI command. I would assume other tagging applications have the same facility for vorbis comments.
All my .oggs can now be correctly browsed by year.
Any chance of a commit for this...?