Obey the ordering of multi image strips given in the JSON

This commit is contained in:
Tim Brier 2017-04-19 08:51:43 +01:00
parent 95e48b8d8d
commit 08d7c55621

View file

@ -57,7 +57,11 @@ def create_symlinks(d):
order = [] order = []
work = latest work = latest
while work in data["pages"]: while work in data["pages"]:
order.extend(data["pages"][work]["images"].values()) if "imagesOrder" in data["pages"][work].keys():
for url in reversed(data["pages"][work]["imagesOrder"]):
order.append(data["pages"][work]["images"][url])
else:
order.extend(data["pages"][work]["images"].values())
if "prev" in data["pages"][work]: if "prev" in data["pages"][work]:
work = data["pages"][work]["prev"] work = data["pages"][work]["prev"]
else: else: