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 | |
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
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | bindings/python/ipod.py | 6 |
2 files changed, 9 insertions, 2 deletions
@@ -1,3 +1,8 @@ +2009-01-02 Todd Zullinger <tmzullinger at users.sourceforge.net> + + * bindings/python/ipod.py: + Make Track.get_coverart() return None if artwork is absent + 2009-01-02 Christophe Fergeau <teuf@gnome.org> * NEWS: more news, hope the packagers will notice the new 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.""" |