Add .nbmedias to get the nb of files in an album

This commit is contained in:
Simon Conseil
2021-03-06 12:22:55 -03:00
parent fee6efdd86
commit 311d634157

View File

@@ -472,6 +472,10 @@ class Album:
return [self.gallery.albums[join(root_path, path)]
for path in self.subdirs]
@property
def nbmedias(self):
return len(self.medias) + sum(len(album) for album in self.albums)
@property
def url(self):
"""URL of the album, relative to its parent."""