diff options
author | Todd Zullinger <tmz@pobox.com> | 2008-07-08 20:14:33 -0400 |
---|---|---|
committer | Todd Zullinger <tmz@pobox.com> | 2008-07-18 14:07:24 -0400 |
commit | e97c4a62b1d153ba3d3b9bf1721eb4e7ed6398d5 (patch) | |
tree | eac03d1fb29d7c9163d1582f37c4528af465ddec /bindings/python/ipod.py | |
parent | f65a879b0173db372a3ab5b6d9ca8424edbcd0fa (diff) | |
download | libgpod-python-thumb-api-fix-v1.tar.gz libgpod-python-thumb-api-fix-v1.tar.xz libgpod-python-thumb-api-fix-v1.zip |
Fix build of python bindings with new thumbnail APIpython-thumb-api-fix-v1
This just fixes the build. More work needs to be done to properly
adapt the bindings to the new API and make it usable from python.
Diffstat (limited to 'bindings/python/ipod.py')
-rw-r--r-- | bindings/python/ipod.py | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/bindings/python/ipod.py b/bindings/python/ipod.py index e5440d2..29a4a9a 100644 --- a/bindings/python/ipod.py +++ b/bindings/python/ipod.py @@ -965,16 +965,19 @@ class Photo: raise KeyError('No such key: %s' % item) def get_thumbnails(self): + db = self._database + if hasattr(self._database, '_itdb'): + db = self._database._itdb return [Thumbnail(proxied_thumbnail=t, ownerobject=self) for t in gpod.sw_get_artwork_thumbnails( - self._photo)] + db, self._photo)] thumbnails = property(get_thumbnails) class Thumbnail: """A thumbnail in an Photo.""" - _proxied_attributes = [k for k in gpod._Itdb_Thumb.__dict__.keys() + _proxied_attributes = [k for k in gpod._Itdb_Artwork.__dict__.keys() if not (k.startswith("_") or k.startswith("reserved"))] def __init__(self, proxied_thumbnail=None, ownerobject=None): @@ -1022,11 +1025,7 @@ class Thumbnail: if pixbuf_support: def get_pixbuf(self): # this deals with coverart and photo albums + device = self.__ownerobject._database.device if hasattr(self.__ownerobject._database,"_itdb"): - return gpod.itdb_artwork_get_pixbuf( - self.__ownerobject._database._itdb.device, - self._thumbnail) - else: - return gpod.itdb_artwork_get_pixbuf( - self.__ownerobject._database.device, - self._thumbnail) + device = self.__ownerobject._database._itdb.device + return gpod.itdb_artwork_get_pixbuf(device, self._thumbnail) |