summaryrefslogtreecommitdiffstats
path: root/bindings/python/examples/save_photos.py
diff options
context:
space:
mode:
authorTodd Zullinger <tmz@pobox.com>2008-08-20 17:37:32 +0000
committerTodd Zullinger <tmz@pobox.com>2008-08-20 17:37:32 +0000
commit6c851f6823d456e20c4d1a39203373a23b45a88b (patch)
tree37bb6b8b5441a64777d5a2faca68326fc4777633 /bindings/python/examples/save_photos.py
parent4004538ad9f8cff088e93b0e249f3db8edfb284c (diff)
downloadlibgpod-tmz-6c851f6823d456e20c4d1a39203373a23b45a88b.tar.gz
libgpod-tmz-6c851f6823d456e20c4d1a39203373a23b45a88b.tar.xz
libgpod-tmz-6c851f6823d456e20c4d1a39203373a23b45a88b.zip
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
Diffstat (limited to 'bindings/python/examples/save_photos.py')
-rwxr-xr-xbindings/python/examples/save_photos.py8
1 files changed, 3 insertions, 5 deletions
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()