commit 8b3f2608978936ea3f9c1588d153dab091239950 Author: Christian Krause <c...@plauener.de> Date: Mon May 2 01:24:40 2011 +0200
fix parsing of SysInfoExtended for nano 6g The attached patch fixes an issue when parsing SysInfoExtended on iPod nano gen. 6 devices: Apparently they have now two tags for the following lists: AlbumArt (and AlbumArt2) ImageSpecifications (and ImageSpecifications2) ChapterImageSpecs (and ChapterImageSpecs2) e.g.: --------------------- [...] <key>ChapterImageSpecs</key> <array> </array> <key>ChapterImageSpecs2</key> <array> <dict> <key>FormatId</key> <integer>1073</integer> <key>RenderWidth</key> <integer>240</integer> <key>RenderHeight</key> [...] --------------------- The <array> following the first tags are always empty and the <array> following the 2nd type of tags (with the "2" at the end) contains the full list of the respective items. I have checked the following: - SysInfoExtended is correctly written (I have verified that it matches the xml data which is retrieved via raw SCSI inquiry commands as well as via the vendor specific USB requests), so it looks like that they really added these new tags. - I have updated my iPod to the newest firmware 1.1 and it's still the same src/itdb_sysinfo_extended_parser.c | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-) --- diff --git a/src/itdb_sysinfo_extended_parser.c b/src/itdb_sysinfo_extended_parser.c index 0a0dc5b..9ac09f3 100644 --- a/src/itdb_sysinfo_extended_parser.c +++ b/src/itdb_sysinfo_extended_parser.c @@ -517,10 +517,22 @@ static SysInfoIpodProperties *g_value_to_ipod_properties (GValue *value) props = g_new0 (SysInfoIpodProperties, 1); props->artwork_formats = parse_one_formats_list (sysinfo_dict, "AlbumArt"); + if (props->artwork_formats == NULL) { + props->artwork_formats = parse_one_formats_list (sysinfo_dict, + "AlbumArt2"); + } props->photo_formats = parse_one_formats_list (sysinfo_dict, "ImageSpecifications"); + if (props->photo_formats == NULL) { + props->photo_formats = parse_one_formats_list (sysinfo_dict, + "ImageSpecifications2"); + } props->chapter_image_formats = parse_one_formats_list (sysinfo_dict, "ChapterImageSpecs"); + if (props->chapter_image_formats == NULL) { + props->chapter_image_formats = parse_one_formats_list (sysinfo_dict, + "ChapterImageSpecs2"); + } dict_to_struct (sysinfo_dict, sysinfo_ipod_properties_fields_mapping, props); ------------------------------------------------------------------------------ All of the data generated in your IT infrastructure is seriously valuable. Why? It contains a definitive record of application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-d2d-c2 _______________________________________________ gtkpod-cvs2 mailing list gtkpod-cvs2@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2