cast order to int

This commit is contained in:
j 2018-04-21 17:28:08 +01:00
parent 4c4c61bf4c
commit a0f3f411c3

View file

@ -180,11 +180,11 @@ class Engine:
videos = sorted(videos_ + [
self.pandora.get(id, ['code', 'id', 'order', 'title'])
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:
f.write(json.dumps(videos, indent=4, sort_keys=True))
# Get video order
order = {video['id']: video['order'] for video in videos}
order = {video['id']: int(video['order']) for video in videos}
# Sort clips
clips = sorted(
clips,