core: simplify code
This commit is contained in:
10
src/main.py
10
src/main.py
@ -19,14 +19,14 @@ def scan_pages(folders: list[Path]) -> list[Page]:
|
||||
for folder in folders:
|
||||
files: list[Path] = folder.get_files()
|
||||
|
||||
page: Page = Page(folder.get_absolute_path(), folder.get_name(), None, prev, None)
|
||||
page: Page = Page(folder.get_absolute_path(), folder.get_name(), prev=prev)
|
||||
|
||||
raw: Path = Path(folder.get_absolute_path(), folder.get_name() + ".NEF")
|
||||
images: list[Path] = [Picture(file, page=prev, raw=raw) for file in files if file.get_name().endswith(".png")]
|
||||
for file in files:
|
||||
if file.get_name().endswith(".png"):
|
||||
page.add_picture(Picture(file, page=prev, raw=raw))
|
||||
|
||||
page.images = images
|
||||
|
||||
if len(images) == 0:
|
||||
if len(page.get_picture()) == 0:
|
||||
bar.next()
|
||||
continue
|
||||
|
||||
|
Reference in New Issue
Block a user