Skip to content
This repository has been archived by the owner on Oct 26, 2023. It is now read-only.

Commit

Permalink
Fixed type errors in image caching
Browse files Browse the repository at this point in the history
  • Loading branch information
rtrevinnoc committed Feb 7, 2021
1 parent 3379876 commit 06dcc24
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions future.py
Original file line number Diff line number Diff line change
Expand Up @@ -920,16 +920,21 @@ def _updateImages():
listOfImagesFromPeers = [
pack["images"] for pack in listOfDataFromPeers
][0]
bigListOfImages = list(
set(listOfImagesFromHost + listOfImagesFromPeers))
# bigListOfImages = list(
# set(listOfImagesFromHost + listOfImagesFromPeers))
bigListOfImages.sort(key=lambda x: x[1])
bigListOfImages = [
image[0] for image in bigListOfImages if image[0] != ''
]
else:
bigListOfImages = images["images"]

return jsonify(result={"images": bigListOfImages})
return jsonify(
result={
"images":
list({frozenset(item.items()): item
for item in bigListOfImages}.values())
})


@app.route("/_midnightcypher")
Expand Down

0 comments on commit 06dcc24

Please sign in to comment.