sort manual

This commit is contained in:
j 2017-08-12 10:59:08 +02:00
parent 944c68ab3c
commit 4f88792491

View file

@ -21,6 +21,9 @@ def get_info(api, oshash):
},
'keys': ['id', 'instances', 'resolution']
})['data']
if not r['items'][0]['instances']:
print(r)
raise Exception('item without instance')
files[oshash] = {
'path': os.path.join(prefix, r['items'][0]['instances'][0]['path']),
'resolution': r['items'][0]['resolution']
@ -35,7 +38,11 @@ def sort_clips(edit, sort):
reverse = sort.startswith('-')
last = '' if reverse else 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
sort = sort.lstrip('-')
if sort in [
if sort == 'manual':
s = clips
if reverse:
s = reversed(s)
elif sort in [
'id', 'index', 'in', 'out', 'duration',
'title', 'director', 'year', 'videoRatio'
]: