transfer mp3 file to ipod with libgpod

Frédéric Fauberteau <[email protected]> Thu, 29 Sep 2011 22:22:54 +0200
Newsgroups gmane.comp.ipod.gtkpod
Message-ID <[email protected]>
hi all,

For some times, I would like to write a little program which could 
called 'ipodctl' as the {foo/bar/tmp}ctl programs under *BSD. This 
program would provide 3 simple commands 'list', 'add' and 'del' (just 
enough to know what album is on my ipod, add an album and remove one).
I've done some tests, read libgpod API doc, grepped gtkpod source code, 
but I've not achieve to copy one of my tagged mp3 file on my iPod nano.
Here is what I basically done :

Itdb_iTunesDB *itdb;
Itdb_Playlist *pl;
Itdb_Track *track;
GString *string;

itdb = itdb_parse(MOUNTPOINT, NULL);
pl = itdb_playlist_mpl(itdb);
track = itdb_track_new();

string = g_string_new("My Title");
track->title = g_string_free(string, FALSE); /* GString is freed and 
gchar* is returned */
/* I've filled some fields: album, artist, type1, type2, ... */
track->mediatype = ITDB_MEDIATYPE_AUDIO;

itdb_cp_track_to_ipod(track, "test.mp3", NULL);

itdb_write(itdb, NULL);
itdb_start_sync(itdb);
itdb_stop_sync(itdb);

The number of tracks in my itdb is increased by one, but no track 
appears in the master playlist of my iPod.
Maybe I've forgotten one (or more) step.

Best regards,
-- 
Frédéric Fauberteau

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
Gtkpod-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtkpod-devel