mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-14 02:26:58 -07:00
Check path exists for adding exported image file size
This commit is contained in:
parent
1e173c6eeb
commit
b60dcb2a23
1 changed files with 5 additions and 4 deletions
|
@ -1325,10 +1325,11 @@ class Export(object):
|
|||
|
||||
if self.include_images:
|
||||
images_folder = get_export_filepath(self.filename, images=True)
|
||||
for f in os.listdir(images_folder):
|
||||
image_path = os.path.join(images_folder, f)
|
||||
if os.path.isfile(image_path):
|
||||
self.file_size += os.path.getsize(image_path)
|
||||
if os.path.exists(images_folder):
|
||||
for f in os.listdir(images_folder):
|
||||
image_path = os.path.join(images_folder, f)
|
||||
if os.path.isfile(image_path):
|
||||
self.file_size += os.path.getsize(image_path)
|
||||
|
||||
self.success = True
|
||||
logger.info("Tautulli Exporter :: Successfully exported to '%s'", filepath)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue