Add server-side folder picker

New GET /api/browse endpoint lists subdirectories at any path.
UI gets a folder icon button next to each path input that opens
a browsable directory tree modal. Escape or Cancel closes it,
clicking a folder navigates into it, Select confirms the choice.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
tocmo
2026-04-04 23:55:42 -04:00
parent 868da9016d
commit c19825c523
8 changed files with 214 additions and 4 deletions

View File

@@ -35,7 +35,9 @@ VIDEO_EXT = {
SUPPORTED_EXT = PHOTO_EXT | VIDEO_EXT
DB_PATH = "/data/dupfinder.db"
_DATA_DIR = Path("/data") if Path("/data").exists() else Path(__file__).parent.parent / "data"
_DATA_DIR.mkdir(parents=True, exist_ok=True)
DB_PATH = str(_DATA_DIR / "dupfinder.db")
# Shared scan state (updated by background thread, read by status endpoint)
scan_state = {