Re: [Rhythmbox-devel] iPod patch - read iPod name



Hi,

Sorry for taking so long to answer. The patch mostly looks good, here
are a few comments/questions:
* ipod_get_name probably should use g_file_get_contents (mainly because
it probably handles errors better than your code)
* GString should be allocated using g_string_new, not g_malloc0
* I suspect the string in the DeviceInfo file is encoded in UTF-16 (one
would need to check by setting a name with non-iso8859-1 characters for
his ipod in iTunes if that's possible). If so, you can use
g_utf16_to_utf8 to get the iPod name in UTF-8 (with the caveat that you
need to find out the endianness of the file and convert it to the system
endianness if necessary).

Hope that helps, and once again, sorry for the long delay,

Christophe

Le jeudi 05 août 2004 à 20:26 -0500, Adam Israel a écrit :
> Hey everyone,
> 
> This is my first patch for Rhythmbox, and my first time using arch, so
> please tell me if I'm doing something wrong.
> 
> 
> This patch (technically, two patches because I committed the first patch
> before I cleaned up some commented-out code) will read the DeviceInfo
> from the iPod and rename the source from the generic "iPod" to the
> actual name of the ipod, i.e., "Adam's iPod".
> 
> Patches are here:
> http://battleaxe.net/arch/
> 
> The screenshot of the result is here:
> http://www.stonetable.org/rb-ipodname.png
> 
> 

Attachment: signature.asc
Description: Ceci est une partie de message =?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e?=



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]