Esempio n. 1
0
	def get_thumbnail(self, width, height):
		if not (hasattr(self, "cover_data") or hasattr(self, "cover_file")):
			cover_file = self._get_thumb_local()
			if cover_file:
				self.cover_file = cover_file
			if _MUTAGEN and not hasattr(self, "cover_file"):
				cover_data = self._get_thumb_metadata()
				if cover_data:
					self.cover_data = cover_data

		try:
			if hasattr(self, "cover_file"):
				return icons.get_pixbuf_from_file(self.cover_file, width, height)
			elif hasattr(self, "cover_data"):
				return icons.get_pixbuf_from_data(self.cover_data, width, height)
		except(glib.GError):
			pass
Esempio n. 2
0
    def get_thumbnail(self, width, height):
        if not (hasattr(self, "cover_data") or hasattr(self, "cover_file")):
            cover_file = self._get_thumb_local()
            if cover_file:
                self.cover_file = cover_file
            if _MUTAGEN and not hasattr(self, "cover_file"):
                cover_data = self._get_thumb_metadata()
                if cover_data:
                    self.cover_data = cover_data

        try:
            if hasattr(self, "cover_file"):
                return icons.get_pixbuf_from_file(self.cover_file, width,
                                                  height)
            elif hasattr(self, "cover_data"):
                return icons.get_pixbuf_from_data(self.cover_data, width,
                                                  height)
        except (glib.GError):
            pass
Esempio n. 3
0
 def get_thumbnail(self, width, height):
     if self.image:
         return icons.get_pixbuf_from_data(self.image, width, height)
     return GroupingLeaf.get_thumbnail(self, width, height)
Esempio n. 4
0
 def get_thumbnail(self, width, height):
     if self.image:
         return icons.get_pixbuf_from_data(self.image, width, height)
     return GroupingLeaf.get_thumbnail(self, width, height)
Esempio n. 5
0
	def get_thumbnail(self, width, height):
		if self.image:
			return icons.get_pixbuf_from_data(self.image, width, height)
		return EmailContact.get_thumbnail(self, width, height)
Esempio n. 6
0
 def get_thumbnail(self, width, height):
     if self.image:
         return icons.get_pixbuf_from_data(self.image, width, height)
     return EmailContact.get_thumbnail(self, width, height)
Esempio n. 7
0
	def get_thumbnail(self, width, height):
		if self.thumb:
			return icons.get_pixbuf_from_data(self.thumb, width, height)
		return UrlLeaf.get_thumbnail(self, width, height)