I'll let you know how I go with the bindings. Everything seems to be coming along well -  swig is a very handy program.

Your email helped a lot. I'd been adding tracks to the master playlist, so I didn't think to look in any other playlist for errors. It turns out there was a few tracks in my podcast playlist without any tag information. When I removed these the problem resolved itself.

So, thanks for your help! Things are moving along nicely again now.


On 12/22/05, Jorg Schuler <Jorg.Schuler@gmx.de> wrote:
Hi Brad,

if you get the JNI running, we should discuss adding it to the bindings/

Now for your questions:

> I've been playing around with a JNI (Java Native Interface) wrapper for
> the libgpod project. It's been coming along ok - I can read playlists
> and tracks. I am now trying to add functionality to add a new track to
> the db, but I'm coming up with an error in g_str_hash after I call
> itdb_write_file.
> My guess is that I'm not initialising something properly. I've gone
> through the gtkpod code and the libgpod code as best and copied that
> order as best I can, but I was wondering if somebody could confirm the
> steps needed  to transfer a new file to the ipod - both the actual file
> transfer and the itunesdb updates.
> At the moment I am:
> Calling itdb_track_new()


> Setting the gchar values to empty defaults.

Not really necessary for libgpod -- just a convenience inside gtkpod.

> Calling itdb_track_add()


> Calling itdb_playlist_add_track() on the master playlist


> Calling itdb_cp_track_to_ipod


> Calling itdb_write.


> Am I missing anything? How many of the _Itdb_Track members do I need to
> set to get a basic transfer happening?

I don't see what you are missing.

g_str_hash is only used when writing the podcast playlist, and the only
parameter passed to g_str_hash is track->album. Does this help you to track
down the problem? Can you post more precise error messages?

The code is in itdb_itunesdb: write_podcast_mhips()