Allow import or sort single files

This commit is contained in:
Cédric Leporcq 2022-07-24 13:32:32 +02:00
parent 16e62cd451
commit ed9fd7cc21
2 changed files with 6 additions and 1 deletions

View File

@ -361,7 +361,7 @@ class Paths:
:return: Path path
"""
if not path.exists():
self.log.error(f'Directory {path} does not exist')
self.log.error(f'Path {path} does not exist')
sys.exit(1)
return path

View File

@ -718,6 +718,11 @@ class Medias:
"""Get paths"""
for src_dir in src_dirs:
src_dir = self.paths.check(src_dir)
if src_dir.is_file():
yield src_dir.parent, src_dir
continue
paths = self.paths.get_paths_list(src_dir)
# Get medias and src_dirs