diff options
| author | Nicholas Piper <nicholas@users.sourceforge.net> | 2006-04-07 15:21:19 +0000 |
|---|---|---|
| committer | Nicholas Piper <nicholas@users.sourceforge.net> | 2006-04-07 15:21:19 +0000 |
| commit | e8690aa99409fadedec9a671406655538f8e3fde (patch) | |
| tree | 357e36761350f43f7c0722a063ab2aa6fc9a0015 /bindings/python | |
| parent | cbf9ee64039b583cb284e67b1b63f74b622028f7 (diff) | |
| download | libgpod-e8690aa99409fadedec9a671406655538f8e3fde.tar.gz libgpod-e8690aa99409fadedec9a671406655538f8e3fde.tar.xz libgpod-e8690aa99409fadedec9a671406655538f8e3fde.zip | |
Delete the temp files AFTER we finish writing to the ipod.
git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1231 f01d2545-417e-4e96-918e-98f8d0dbbcb6
Diffstat (limited to 'bindings/python')
| -rwxr-xr-x | bindings/python/examples/coverart_fetch.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/bindings/python/examples/coverart_fetch.py b/bindings/python/examples/coverart_fetch.py index 398dfba..77fd54a 100755 --- a/bindings/python/examples/coverart_fetch.py +++ b/bindings/python/examples/coverart_fetch.py @@ -45,6 +45,8 @@ images = {} for track in gpod.sw_get_tracks(itdb): print track.artist, track.album, track.title, " :", + #gpod.itdb_track_remove_thumbnails(track) + if track.artwork.artwork_size: print "Already has artwork, skipping." continue @@ -91,12 +93,13 @@ for track in gpod.sw_get_tracks(itdb): except KeyError: print "No image available for %s, %s" % (track.album,track.artist) + +print "Writing ipod database..." +gpod.itdb_write(itdb, None) + print "Cleaning up downloaded images..." # really, we should do this if any of the real work threw an exception # too. This is just a demo script :-) for filename in images.values(): os.unlink(filename) -print "Writing ipod database..." -gpod.itdb_write(itdb, None) - |
