From: Christophe F. <te...@gn...> - 2007-04-14 11:03:12
|
Le jeudi 12 avril 2007 à 07:14 +0900, Jorg Schuler a écrit : > Sounds like a good idea. Should probably have done so from the > beginning. Best to mark the itdb_time functions as "deprecated". The attached patch does that, there are still a few unresolved issues: * smart playlist times aren't transparently converted, I'm not really familiar with them so wasn't sure what I had to change ;) Would it be enough to do the conversion in the two "case splft_date:" which can be found in itdb_itunesdb.c or does it require something more involved? * I assumed Itdb_Track::time_released is stored in the iPod timezone in spite of the itdb.h comment saying something else. I did that because I couldn't find any similar comment on ipodlinux.org and because it was easier, if this field is confirmed to be stored in UTF-7, I'll fix the patch. * I had to split itdb_parse_file in an itdb_parse_internal subfunction because to get timezone right, I needed a valid Itdb_Device object when parsing the iPod database, so instead of doing: itdb_parse itdb_parse_file (<= this creates a new Itdb_iTunesDB) itdb_set_mountpoint (<= this sets a valid timezone) now the code does itdb_parse itdb_new itdb_set_mountpoint itdb_parse_internal * there's a comment starting with "teuf 20070414" in itdb_itunesdb.c which I added since I think the comment above is now obsolete, but I wasn't sure I understood it so I left it ;) Anyway, here's the patch, Christophe |