From 95e57d9ad33d11c6bcee94e2ac018ecd5ad5779b Mon Sep 17 00:00:00 2001 From: rolux Date: Wed, 11 Jan 2012 17:52:59 +0530 Subject: [PATCH] add item key to layers --- pandora/0xdb.jsonc | 3 +++ pandora/item/tasks.py | 8 ++++---- pandora/padma.jsonc | 5 +++++ 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/pandora/0xdb.jsonc b/pandora/0xdb.jsonc index 2598999c..19fb44e2 100644 --- a/pandora/0xdb.jsonc +++ b/pandora/0xdb.jsonc @@ -498,6 +498,7 @@ "id": "privatenotes", "title": "Private Notes", "canAddAnnotations": {"member": true, "friend": true, "staff": true, "admin": true}, + "item": "Note", "overlap": true, "private": true, "type": "text" @@ -506,6 +507,7 @@ "id": "publicnotes", "title": "Public Notes", "canAddAnnotations": {"member": true, "friend": true, "staff": true, "admin": true}, + "item": "Note", "overlap": true, "type": "text" }, @@ -515,6 +517,7 @@ "canAddAnnotations": {"staff": true, "admin": true}, "hasEvents": true, "hasPlaces": true, + "item": "Subtitle", "overlay": true, "sort": [ {"id": "words", "title": "Words", "type": "words"}, diff --git a/pandora/item/tasks.py b/pandora/item/tasks.py index 12ae4061..ff219b39 100644 --- a/pandora/item/tasks.py +++ b/pandora/item/tasks.py @@ -101,17 +101,17 @@ def update_sitemap(base_url): el.text = i.get('title') el = ET.SubElement(video, "video:thumbnail_loc") icon = settings.CONFIG['user']['ui']['icons'] == 'frames' and 'icon' or 'poster' - el.text = absolute_url("%s/%s128.jpg" %(i.itemId, icon)) + el.text = absolute_url("%s/%s256.jpg" %(i.itemId, icon)) description = i.get('description', i.get('summary', '')) if description: el = ET.SubElement(video, "video:description") el.text = i.get('description', i.get('summary', '')) el = ET.SubElement(video, "video:family_friendly") el.text = 'Yes' - duration = i.get('duration') - if duration: + duration = i.sort.duration + if duration > 0: el = ET.SubElement(video, "video:duration") - el.text = "%s" % duration + el.text = "%s" % int(duration) with open(sitemap[:-3], 'wb') as f: f.write('\n' + ET.tostring(urlset)) diff --git a/pandora/padma.jsonc b/pandora/padma.jsonc index dfd6440e..4f18e216 100644 --- a/pandora/padma.jsonc +++ b/pandora/padma.jsonc @@ -405,6 +405,7 @@ "id": "places", "title": "Places", "canAddAnnotations": {"member": true, "staff": true, "admin": true}, + "item": "Place", "overlap": true, "type": "place" }, @@ -412,6 +413,7 @@ "id": "events", "title": "Events", "canAddAnnotations": {"member": true, "staff": true, "admin": true}, + "item": "Event", "overlap": true, "type": "event" }, @@ -419,6 +421,7 @@ "id": "keywords", "title": "Keywords", "canAddAnnotations": {"member": true, "staff": true, "admin": true}, + "item": "Keyword", "overlap": true, "type": "string" }, @@ -426,6 +429,7 @@ "id": "descriptions", "title": "Descriptions", "canAddAnnotations": {"member": true, "staff": true, "admin": true}, + "item": "Description", "overlay": true, "type": "text" }, @@ -433,6 +437,7 @@ "id": "transcripts", "title": "Transcripts", "canAddAnnotations": {"member": true, "staff": true, "admin": true}, + "item": "Transcript", "overlay": true, "type": "text" }