diff options
author | Todd Zullinger <tmz@pobox.com> | 2009-01-03 02:57:45 +0000 |
---|---|---|
committer | Todd Zullinger <tmz@pobox.com> | 2009-01-03 02:57:45 +0000 |
commit | 64a614ea008fb42827993285695601da00df6fa3 (patch) | |
tree | 9075c24a9992fe692e3dc671407fe843a5bb039f /bindings | |
parent | 1256a3ef56985c22b4a1439018f2760fd0697011 (diff) | |
download | libgpod-tmz-64a614ea008fb42827993285695601da00df6fa3.tar.gz libgpod-tmz-64a614ea008fb42827993285695601da00df6fa3.tar.xz libgpod-tmz-64a614ea008fb42827993285695601da00df6fa3.zip |
Python: make Track.get_coverart() return None if artwork is absent
git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@2192 f01d2545-417e-4e96-918e-98f8d0dbbcb6
Diffstat (limited to 'bindings')
-rw-r--r-- | bindings/python/ipod.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/bindings/python/ipod.py b/bindings/python/ipod.py index 4c82ebe..8853d01 100644 --- a/bindings/python/ipod.py +++ b/bindings/python/ipod.py @@ -403,8 +403,10 @@ class Track: pixbuf) def get_coverart(self): - return Photo(proxied_photo=self._track.artwork, - ownerdb=self._track.itdb) + if gpod.itdb_track_has_thumbnails(self._track): + return Photo(proxied_photo=self._track.artwork, + ownerdb=self._track.itdb) + return None def copy_to_ipod(self): """Copy the track to the iPod.""" |