This commit is contained in:
j 2021-11-24 16:40:49 +01:00
parent 1770ac7156
commit 0049dfe84e

View file

@ -41,7 +41,7 @@ class Command(BaseCommand):
continue continue
if isinstance(item['folder'], list): if isinstance(item['folder'], list):
print(item['id']) print(item['id'])
if item['folder'] not in folders: if item['folder'] not in folders:
description = item['folderdescription'] or item['summary'] description = item['folderdescription'] or item['summary']
folders[item['folder']] = { folders[item['folder']] = {
@ -63,7 +63,7 @@ class Command(BaseCommand):
for item in folders.values(): for item in folders.values():
slug = escape_slug(item['title'].split(' / ')[0]) slug = escape_slug(item['title'].split(' / ')[0])
f, c = models.Film.objects.get_or_create(slug=slug) f, c = models.Film.objects.get_or_create(slug=slug)
f.pandora_url = item['url'] f.pandora_url = ox.decode_html(item['url'])
for key, value in item.items(): for key, value in item.items():
if key != 'url': if key != 'url':
f.data[{ f.data[{