Beispiel #1
0
 def get_metadata(self, ids):
     gallery = Gallery(ids["gallery"])
     metadata = pyexiv2.ImageMetadata(gallery.get_disk_path(
             dir=ids["collection"], file=ids["image"]
         ))
     metadata.read()
     return metadata        
Beispiel #2
0
    def simple_nav(self, gallery_name, gallery_split):
        collection_name = gallery_split[3]

        gallery = Gallery(gallery_name)
        
        if len(gallery_split) == 4: # len(gallery_split[4]) == 0:
            current_image = gallery.get_next_image(collection_name)
        else:
            current_image = gallery_split[4]

        return render.simple(
            gallery_name,
            collection_name,
            gallery.get_disk_path(collection_name, current_image, for_disk=False), 
            gallery.get_previous_image(collection_name, current_image), 
            gallery.get_next_image(collection_name, current_image)
            )