mirror of
https://github.com/th3r00t/pyShelf.git
synced 2026-04-28 01:59:35 -04:00
Debuging collection folder pathing
This commit is contained in:
7
src/backend/lib/storage.py
vendored
7
src/backend/lib/storage.py
vendored
@@ -171,8 +171,11 @@ class Storage:
|
|||||||
relative_parts = Path(file_name).relative_to(self.config.book_path).parts
|
relative_parts = Path(file_name).relative_to(self.config.book_path).parts
|
||||||
except ValueError:
|
except ValueError:
|
||||||
continue # skip books outside the configured path
|
continue # skip books outside the configured path
|
||||||
|
breakpoint()
|
||||||
folder = relative_parts[1]
|
if len(relative_parts) < 2:
|
||||||
|
folder = relative_parts[1]
|
||||||
|
else:
|
||||||
|
folder = relative_parts[0]
|
||||||
# check if collection exists
|
# check if collection exists
|
||||||
collection = session.execute(
|
collection = session.execute(
|
||||||
select(Collection).where(Collection.name == folder)
|
select(Collection).where(Collection.name == folder)
|
||||||
|
|||||||
Reference in New Issue
Block a user