sort manual
This commit is contained in:
parent
944c68ab3c
commit
4f88792491
1 changed files with 8 additions and 1 deletions
9
edit.py
9
edit.py
|
@ -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'
|
||||
]:
|
||||
|
|
Loading…
Reference in a new issue