From: Todd Z. <tm...@po...> - 2007-11-29 22:21:29
|
Richard Laager wrote: > I'm looking for a way to load my iPod with a specific list of files > I've generated from another application. After the sync, I want the > iPod to contain all of those files and only those files (i.e. other > files already on the iPod would be deleted). You should be able to do this with libgpod, using either C or python. > Ideally, this would be done in such a way that files that were > already on the iPod would not be copied again. Is this something I > can do with gtkpod or libgpod and how? You could also read the metadata about the track you were adding. If there's a track in the iTunesDB that matches, then compare the file you're about to add with the one stored on the iPod. Only copy if the files differ. This can be aided a bit by using the iTunesDB.ext file. Gtkpod creates this file and uses it to keep track of where a particular track is on the local disk (including a hash of the first few bytes of the file, to speed up comparisons). The libgpod python bindings will read and write this file as well. If you used C to build something with libgpod, you'd need to do a little work to parse the file (or create something similar for your app). It might even be nice to have this in libgpod natively, so other apps could take advantage of it. --=20 Todd OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Blessed are they who can laugh at themselves for they shall never cease to be amused. |