This commit is contained in:
2026-05-16 18:51:10 +03:00
parent 49d8dcf012
commit f88eaf70a7
+8 -8
View File
@@ -1,18 +1,19 @@
"""
Entry point for the backend (no GUI).
For now, this verifies configuration + database setup and can run a one-off sync.
Future iterations will wire up scheduler and a GUI.
"""
from __future__ import annotations from __future__ import annotations
""" import asyncio
Entry point for the new backend (no GUI). For now, this only verifies
that configuration and database setup work. Future iterations will wire
up scanner, diff engine, queue, and scheduler.
"""
from pathlib import Path from pathlib import Path
from .config.settings import Settings from .config.settings import Settings
from .core.database.db import Database from .core.database.db import Database
from .core.sync.service import SyncService from .core.sync.service import SyncService
from .core.sync.executor import ActionExecutor from .core.sync.executor import ActionExecutor
from .core.models import SyncActionType
from .core.utils.yt import extract_playlist_id from .core.utils.yt import extract_playlist_id
from .core.utils.deps import DependencyError from .core.utils.deps import DependencyError
@@ -37,7 +38,6 @@ def bootstrap(db_path: Path | None = None) -> None:
summary = ", ".join(f"{k.name}:{v}" for k, v in counts.items()) summary = ", ".join(f"{k.name}:{v}" for k, v in counts.items())
print(f"Plan → {summary}") print(f"Plan → {summary}")
# Execute # Execute
import asyncio
try: try:
asyncio.run(executor.execute(actions, pl)) asyncio.run(executor.execute(actions, pl))
except DependencyError as e: except DependencyError as e: