Example #1
0
    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)
Example #2
0
    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)
Example #3
0
    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)