Default album art image

Use images/ocarina.png as the default album art image if none can be
found
This commit is contained in:
Bryan Schumaker 2010-10-30 12:22:26 -04:00
parent 2861e3d3b9
commit 4f771dd6e7
1 changed files with 5 additions and 8 deletions

View File

@ -26,22 +26,19 @@ class AlbumArt(Image):
Image.__init__(self)
self.hide()
self.file = None
self.set("images/ocarina.png")
libsaria.event.invite("PRELOAD", self.preload)
libsaria.event.invite("POSTGETART", self.set)
def preload(self, *args):
self.file = None
self.hide()
self.file = "images/ocarina.png"
def set(self, file=None):
if file != None:
self.file = file
if self.file != None:
self.set_from_file(self.file)
self.set_height(64)
self.show()
else:
self.hide()
self.set_from_file(self.file)
self.set_height(64)
self.show()
def set_height(self, new_h):
size = self.size_request()