use code as secondary sort
This commit is contained in:
parent
8c618ab988
commit
97a65ad52d
1 changed files with 6 additions and 1 deletions
|
@ -470,10 +470,15 @@ class Engine:
|
||||||
f.write(json.dumps(videos, indent=4, sort_keys=True))
|
f.write(json.dumps(videos, indent=4, sort_keys=True))
|
||||||
# Get video order
|
# Get video order
|
||||||
order = {video['id']: int(video['order']) for video in videos}
|
order = {video['id']: int(video['order']) for video in videos}
|
||||||
|
code = {video['id']: video['code'] for video in videos}
|
||||||
# Sort clips
|
# Sort clips
|
||||||
clips = sorted(
|
clips = sorted(
|
||||||
clips,
|
clips,
|
||||||
key=lambda clip: (order[clip['id'].split('/')[0]], clip['in'])
|
key=lambda clip: (
|
||||||
|
order[clip['id'].split('/')[0]],
|
||||||
|
ox.sort_string(code[clip['id'].split('/')[0]],
|
||||||
|
clip['in']
|
||||||
|
)
|
||||||
)
|
)
|
||||||
# Get and cache playlists
|
# Get and cache playlists
|
||||||
self.playlists = [playlist for playlist in [{
|
self.playlists = [playlist for playlist in [{
|
||||||
|
|
Loading…
Reference in a new issue