Browse Source

Make gallery cover index variable

master
Marien Fressinaud 5 years ago
parent
commit
534866add5
1 changed files with 2 additions and 1 deletions
  1. 2
    1
      boop.py

+ 2
- 1
boop.py View File

@@ -24,13 +24,14 @@ def list_galleries_in(path):
continue

photos.sort(key=itemgetter("name"))
cover_index = (len(gallery_dir.name) + 42) % len(photos)
gallery = {
"name": gallery_dir.name,
"path": gallery_dir.path,
"url": gallery_dir.name,
"num_photos": len(photos),
"photos": photos,
"cover_photo": photos[0],
"cover_photo": photos[cover_index],
}
yield gallery


Loading…
Cancel
Save