Skip to content

Commit

Permalink
remove duplicate paths
Browse files Browse the repository at this point in the history
  • Loading branch information
meisnate12 committed Aug 18, 2023
1 parent 2da0935 commit e8304b3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.0-develop5
1.0.0-develop6
4 changes: 4 additions & 0 deletions plex_image_cleanup.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ def get_resources(media):

total_images = 0
total_size = 0
paths_worked = []
for section in server.library.sections():
section_images = 0
logger.info(f"Scanning Library: {section.title}", start=section.title)
Expand All @@ -248,6 +249,9 @@ def get_resources(media):

local_path = Path(meta_dirs[item.type]) / guid_hash[0] / f"{guid_hash[1:]}.bundle" / "Uploads" / resource_path
source_path = meta_dir / local_path
if source_path in paths_worked:
continue
paths_worked.append(source_path)

if source_path.exists():
section_images += 1
Expand Down

0 comments on commit e8304b3

Please sign in to comment.