cast order to int
This commit is contained in:
parent
4c4c61bf4c
commit
a0f3f411c3
1 changed files with 2 additions and 2 deletions
|
@ -180,11 +180,11 @@ class Engine:
|
||||||
videos = sorted(videos_ + [
|
videos = sorted(videos_ + [
|
||||||
self.pandora.get(id, ['code', 'id', 'order', 'title'])
|
self.pandora.get(id, ['code', 'id', 'order', 'title'])
|
||||||
for id in ids if not id in ids_
|
for id in ids if not id in ids_
|
||||||
], key=lambda video: video['order'])
|
], key=lambda video: int(video['order']))
|
||||||
with open(filename, 'w') as f:
|
with open(filename, 'w') as f:
|
||||||
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']: video['order'] for video in videos}
|
order = {video['id']: int(video['order']) for video in videos}
|
||||||
# Sort clips
|
# Sort clips
|
||||||
clips = sorted(
|
clips = sorted(
|
||||||
clips,
|
clips,
|
||||||
|
|
Loading…
Reference in a new issue