Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Tree [5a0a18] /
History



File Date Author Commit
bindings 2007-05-30 Todd Zullinger Todd Zullinger [5a0a18] change CVS references and links to SVN
docs 2007-05-30 Todd Zullinger Todd Zullinger [5a0a18] change CVS references and links to SVN
m4 2007-05-30 Todd Zullinger Todd Zullinger [5a0a18] change CVS references and links to SVN
po 2007-01-16 Jorg Schuler Jorg Schuler [826de0] * po/fr.po: updated French catalog -- t...
src 2007-05-27 Jorg Schuler Jorg Schuler [087014] * src/db-artwork-parser.c
tests 2007-05-07 Jorg Schuler Jorg Schuler [fdd5fe] * src/itdb_artwork.c
AUTHORS 2005-09-10 Christophe Fergeau Christophe Fergeau [c76e33] Initial import
COPYING 2005-11-21 Christophe Fergeau Christophe Fergeau [07d714] 2005-11-21 Christophe Fergeau <teuf@gnome.org>
ChangeLog 2007-05-30 Todd Zullinger Todd Zullinger [5a0a18] change CVS references and links to SVN
INSTALL 2005-09-22 Jorg Schuler Jorg Schuler [3a9ca9] * applied Christophe Fergeau's patch which add...
INSTALL_CVS 2007-02-27 Todd Zullinger Todd Zullinger [a0c524] build docs when creating tarballs
Makefile.am 2007-01-15 Jorg Schuler Jorg Schuler [5e5d35] * INSTALL_CVS:
NEWS 2005-09-10 Christophe Fergeau Christophe Fergeau [c76e33] Initial import
README 2007-01-11 Todd Zullinger Todd Zullinger [d83846] Add PhotoDB functions to the docs.
TROUBLESHOOTING 2007-05-13 Jorg Schuler Jorg Schuler [dd38d1] * TROUBLESHOOTING: added a note about t...
autogen.sh 2005-11-21 Christophe Fergeau Christophe Fergeau [a7b3cb] 2005-11-21 Christophe Fergeau <teuf@gnome.org>
configure.ac 2007-03-26 Nicholas Piper Nicholas Piper [3ce6da] Use build-tree libraries for Python test, not t...
gnome-autogen.sh 2007-01-04 Todd Zullinger Todd Zullinger [b12d81] * configure.ac
libgpod-1.0.pc.in 2005-09-10 Christophe Fergeau Christophe Fergeau [c76e33] Initial import

Read Me

libgpod is a library meant to abstract access to an iPod content. It
provides an easy to use API to retrieve the list of files and playlist
stored on an iPod, to modify them and to save them back to the iPod.

This code was originally part of gtkpod (www.gtkpod.org). When the iPod
content parsing code was made to be self-contained with gtkpod 0.93,
we chose to put this code in a separate library so that other project
can benefit from it without duplicating code.

If you decide to make improvements, like support for cover art or
photos please contact us so we can work together. Just drop a mail to
Gtkpod-devel@lists.sourceforge.net (you may ask to be CC in the
answer).

----------------------------------------------------------------------

Quick HOWTO use libgpod for audio

itdb_parse(): read the iTunesDB and ArtbookDB
itdb_write(): write the iTunesDB and ArtbookDB

itdb_parse() will return a Itdb_iTunesDB structure with GLists
containing all tracks (each track is represented by a Itdb_Track
structure) and the playlists (each playlist is represented by a
Itdb_Playlist structure).

A number of functions for adding, removing, duplicating tracks are
available. Please see itdb.h for details (itdb_track_*()).

In each Itdb_Playlist structure you can find a GList called 'members'
with listing all member tracks. Each track referenced in a playlist
must also be present in the tracks GList of the iTunesDB.

The iPod must contain one master playlist (MPL) containing all tracks
accessible on the iPod through the
Music->Tracks/Albums/Artists... menu. Besides the MPL there can be a
number of normal playlists accessible through the Music->Playlists
menu on the iPod. Tracks that are a member of one of these normal
playlists must also be a member of the MPL.

The Podcasts playlist is just another playlist with some internal
flags set differently. Also, member tracks in the Podcasts playlist
are not normally members of the MPL (so on the iPod they will only
show up under the Podcasts menu). All tracks referenced must be in the
tracklist of the Itdb_iTunesDB, however.

A number of functions to add/remove playlists, or add/remove tracks
are available. Please see itdb.h for details (itdb_playlist_*()).

Each track can have a thumbnail associated with it. You can retrieve a
GdkPixmap of the thumbnail using itdb_thumb_get_gdk_pixbuf() (tracks
have thumbnails of the following types associated:
ITDB_THUMB_COVER_SMALL and _LARGE). You can remove a thumbnail with
itdb_track_remove_thumbnails(). And finally, you can set a new
thumbnail using itdb_track_set_thumbnails().

Please note that iTunes additionally stores the artwork as tags in the
original music file. That's also from where the data is read when
artwork is displayed in iTunes, and there can be more than one piece
of artwork. libgpod does not store the artwork as tags in the original
music file. As a consequence, if you iTunes attempts to access the
artwork, it will find none, and remove libgpod's artwork. Luckily,
iTunes will only attempt to access the artwork if you select a track
in Tunes. (To work around this, gtkpod keeps a list of the original
filename of all artwork and silently adds the thumbnails if they were
'lost'. Your application might want to do something similar, or you
can supply patches for optionally! adding tags to the original music
files.)

The Itdb_iTunesDB, Itdb_Playlist and Itdb_Track structures each have a
userdata and a usertype field that can be used by the application to
store application-specific additional data. If userdata is a pointer
to an external structure, you can supply a ItdbUserDataDuplicateFunc
and a ItdbUserDataDestroyFunc so that this data can be duplicated
or freed automatically with a call to the library _duplicate()/_free()
functions.

For more information I would advice to have a look at gtkpod's source
code. You can also ask questions on the developer's mailing list:
gtkpod-devel at lists dot sourceforge dot net


Jörg Schuler (jcsjcs at users dot sourceforge dot net)

----------------------------------------------------------------------

Quick HOWTO use libgpod for photos

   itdb_photodb_parse():
       Read an existing PhotoDB.

   itdb_photodb_create():
       Create a new Itdb_PhotoDB structure. The Photo Library Album is
       (first album) is created automatically.

   itdb_photodb_add_photo(), itdb_photodb_add_photo_from_data():
       Add a photo to the PhotoDB (from file or from a chunk of
       memory). It is automatically added to the Photo Library Album
       (first album), which is created if it does not exist already.

   itdb_photodb_photoalbum_create():
       Create and add a new photoalbum.

   itdb_photodb_photoalbum_add_photo():
       Add a photo (Itdb_Artwork) to an existing photoalbum.

   itdb_photodb_photoalbum_remove():
       Remove an existing photoalbum. Pictures can be kept in the
       Photo Library or automatically removed as well.

   itdb_photodb_remove_photo():
       Remove a photo either from a photoalbum or completely from the database.

   itdb_photodb_write():
       Write out your PhotoDB.

   itdb_photodb_free():
       Free all memory taken by the PhotoDB.

   itdb_photodb_photoalbum_by_name():
       Find the first photoalbum with a given name or the Photo
       Library Album if called with no name.


If you cannot add photos because your iPod is not recognized, you may
have to set the iPod model by calling

itdb_device_set_sysinfo (db->device, "ModelNumStr", model);

For example, "MA450" would stand for an 80 GB 6th generation iPod
Video. See itdb_device.c for a list of supported models.

This information will be written to the iPod when the PhotoDB is saved
(itdb_device_write_sysinfo() is called).

Have a look at the following test-photos test program in the tests/
subdirectory for an example of how to use the interface.


Jörg Schuler (jcsjcs at users dot sourceforge dot net)

----------------------------------------------------------------------