Fix export download not including images

This commit is contained in:
JonnyWong16 2022-01-30 17:26:08 -08:00
commit fe388e903d
No known key found for this signature in database
GPG key ID: B1F1F9807184697A

View file

@ -1928,14 +1928,13 @@ class Export(object):
self.file_size += os.path.getsize(filepath) self.file_size += os.path.getsize(filepath)
def _exported_images(self, title): def _exported_images(self, title):
images_dirpath = get_export_dirpath(self.directory, images_directory=title) dirpath = get_export_dirpath(self.directory)
if os.path.exists(images_dirpath): for root, dirs, files in os.walk(dirpath):
for f in os.listdir(images_dirpath): if any(f.endswith('.thumb.jpg') for f in files):
if f.endswith('.thumb.jpg'): self.exported_thumb = True
self.exported_thumb = True elif any(f.endswith('.art.jpg') for f in files):
elif f.endswith('.art.jpg'): self.exported_art = True
self.exported_art = True
def _media_type(self, obj): def _media_type(self, obj):
return 'photoalbum' if self.is_photoalbum(obj) else obj.type return 'photoalbum' if self.is_photoalbum(obj) else obj.type