From a784f5941d57b692338782b1955f5721aaabaa7d Mon Sep 17 00:00:00 2001 From: tmzullinger Date: Wed, 20 Aug 2008 17:37:32 +0000 Subject: Update python bindings to work with the new thumbnail API. This removes sw_get_artwork_thumbnails() and the Thumbnail class from the python bindings. The get_pixbuf() function is now in the Photo class. git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@2108 f01d2545-417e-4e96-918e-98f8d0dbbcb6 --- bindings/python/examples/save_photos.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'bindings/python/examples') diff --git a/bindings/python/examples/save_photos.py b/bindings/python/examples/save_photos.py index ec8079b..c02a5ab 100755 --- a/bindings/python/examples/save_photos.py +++ b/bindings/python/examples/save_photos.py @@ -24,7 +24,7 @@ import gpod -if not hasattr(gpod.Thumbnail, 'get_pixbuf'): +if not hasattr(gpod.Photo, 'get_pixbuf'): print 'Sorry, gpod was built without pixbuf support.' raise SystemExit @@ -35,9 +35,7 @@ for album in photodb.PhotoAlbums: print " ", album for photo in album: print " ", photo - for thumbnail, n in zip(photo.thumbnails, - range(0,len(photo.thumbnails))): - print " ", thumbnail - thumbnail.get_pixbuf().save("/tmp/%d-%d.png" % (photo['id'],n),"png") + for w,h,s in ((0,0,'small'), (-1,-1,'large')): + photo.get_pixbuf(w,h).save("/tmp/%d-%s.png" % (photo['id'],s),"png") photodb.close() -- cgit