diff --git a/README.md b/README.md index e732ac9..a887482 100644 --- a/README.md +++ b/README.md @@ -98,7 +98,7 @@ python -m app.cli --apply --playlist 0 ## Data & Layout -- Database: `app/data/app.db` +- Database: `db/app.db` - Outputs: `/audio` and/or `/video` - Recycle bin: `/.recycle/{audio,video}` diff --git a/src/app/cli.py b/src/app/cli.py index 4f87963..e86abd9 100644 --- a/src/app/cli.py +++ b/src/app/cli.py @@ -19,7 +19,7 @@ from .core.utils.logging_setup import configure_logging def main(argv: list[str] | None = None) -> int: parser = argparse.ArgumentParser(description="YouTube Playlist Sync — compute/apply actions") parser.add_argument("--apply", action="store_true", help="Apply actions (otherwise compute-only)") - parser.add_argument("--db", type=Path, default=Path("app/data/app.db"), help="Path to SQLite database") + parser.add_argument("--db", type=Path, default=Path("db/app.db"), help="Path to SQLite database") parser.add_argument("--playlist", type=int, default=None, help="Only run for a specific playlist index (0-based)") parser.add_argument("--verbose", action="store_true", help="Print detailed events (rename/recycle/start)") parser.add_argument("--debug", action="store_true", help="Enable debug logging to console + app/data/app.log") diff --git a/src/app/gui/pages/playlists.py b/src/app/gui/pages/playlists.py index c505a02..9b268c9 100644 --- a/src/app/gui/pages/playlists.py +++ b/src/app/gui/pages/playlists.py @@ -130,7 +130,7 @@ class PlaylistManagerPage(QtWidgets.QWidget): # Optional DB metadata (last_sync). If DB is missing/corrupt, keep UI usable. last_sync_by_id: dict[str, str] = {} try: - db = Database(Path("app/data/app.db").resolve()) + db = Database(Path("db/app.db").resolve()) for r in rows: pid = extract_playlist_id(r.url) or r.url ls = db.get_playlist_last_sync(pid) diff --git a/src/app/gui/runner.py b/src/app/gui/runner.py index 2335c79..50c3d86 100644 --- a/src/app/gui/runner.py +++ b/src/app/gui/runner.py @@ -18,7 +18,7 @@ from ..core.events.event_bus import EventBus class SyncRequest: playlist_cfg: Dict[str, Any] apply: bool = True - db_path: Path = Path("app/data/app.db") + db_path: Path = Path("db/app.db") cancel_flag: threading.Event | None = None pause_flag: threading.Event | None = None diff --git a/src/app/main.py b/src/app/main.py index 018e2b1..8e46d1e 100644 --- a/src/app/main.py +++ b/src/app/main.py @@ -20,7 +20,7 @@ from .core.utils.deps import DependencyError def bootstrap(db_path: Path | None = None) -> None: settings = Settings() - db = Database((db_path or Path("app/data/app.db")).resolve()) + db = Database((db_path or Path("db/app.db")).resolve()) service = SyncService(db) executor = ActionExecutor(db)