mirror of
https://github.com/darkzoul5/YoutubePlaylistSync.git
synced 2026-07-03 04:23:59 +03:00
Changed the default SQLite DB location from app/data/ to db/
This commit is contained in:
@@ -98,7 +98,7 @@ python -m app.cli --apply --playlist 0
|
||||
|
||||
## Data & Layout
|
||||
|
||||
- Database: `app/data/app.db`
|
||||
- Database: `db/app.db`
|
||||
- Outputs: `<save_path>/audio` and/or `<save_path>/video`
|
||||
- Recycle bin: `<save_path>/.recycle/{audio,video}`
|
||||
|
||||
|
||||
+1
-1
@@ -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")
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
+1
-1
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user