From 64a614ea008fb42827993285695601da00df6fa3 Mon Sep 17 00:00:00 2001 From: Todd Zullinger Date: Sat, 3 Jan 2009 02:57:45 +0000 Subject: 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 --- ChangeLog | 5 +++++ bindings/python/ipod.py | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8dc6368..f2e7290 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-01-02 Todd Zullinger + + * bindings/python/ipod.py: + Make Track.get_coverart() return None if artwork is absent + 2009-01-02 Christophe Fergeau * 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.""" -- cgit