def image_url(self, filename): row = self.data["row"] # Special cased for non-AMO-uploaded themes imported from getpersonas. if row["persona_id"] != 0: if filename == "preview.png": filename = "preview.jpg" elif filename == "icon.png": filename = "preview_small.jpg" image_url = posixpath.join(user_media_url("addons"), str(row["addon_id"]), filename or "") modified = int(row["modified"]) if row["modified"] else 0 return "%s?%s" % (image_url, modified)
def image_url(self, filename): row = self.data['row'] # Special cased for non-AMO-uploaded themes imported from getpersonas. if row['persona_id'] != 0: if filename == 'preview.png': filename = 'preview.jpg' elif filename == 'icon.png': filename = 'preview_small.jpg' image_url = posixpath.join(user_media_url('addons'), str(row['addon_id']), filename or '') modified = int(row['modified']) if row['modified'] else 0 return '%s?%s' % (image_url, modified)