more data
This commit is contained in:
parent
de78084b29
commit
490c712689
4 changed files with 54 additions and 17 deletions
|
|
@ -25,18 +25,29 @@ class Command(BaseCommand):
|
|||
},
|
||||
'keys': [
|
||||
'id', 'title', 'director', 'summary', 'source', 'sourcedescription', 'date', 'location',
|
||||
'country', 'type',
|
||||
'duration', 'featuring', 'cinematographer',
|
||||
'hue', 'saturation', 'lightness',
|
||||
'folder', 'folderdescription'
|
||||
'folder', 'folderdescription', 'rightslevel'
|
||||
],
|
||||
'sort': [{'key': 'duration', 'operator': '-'}],
|
||||
'range': [0, 1000]
|
||||
}
|
||||
folders = {}
|
||||
for item in api.find(**query)['data']['items']:
|
||||
if item['rightslevel'] > 0:
|
||||
continue
|
||||
if isinstance(item['folder'], list):
|
||||
print(item['id'])
|
||||
|
||||
if item['folder'] not in folders:
|
||||
description = item['folderdescription'] or item['summary']
|
||||
folders[item['folder']] = {
|
||||
'title': item['folder'],
|
||||
'date': item['date'],
|
||||
'country': item['country'],
|
||||
'featuring': item['featuring'],
|
||||
'type': item['type'],
|
||||
'description': description,
|
||||
'url': api.url.replace('/api/', '/grid/folder==' + escape(item['folder'])),
|
||||
'items': [],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue