feat: add “fail fast” dependency check

This commit is contained in:
dark_zoul committed 2026-05-15 20:07:53 +03:00
1 parent 1ea4352737
commit e4e342adf5
3 files changed
+30 -2

No files matched your search

+5 -1
View File
@@ -88,7 +88,11 @@ def main(argv: list[str] | None = None) -> int:
summary = ", ".join(f"{k}:{v}" for k, v in sorted(counts.items()))
print(f"Playlist {pid}: {len(actions)} actions → {summary}")
if args.apply and actions:
asyncio.run(executor.execute(actions, pl))
try:
asyncio.run(executor.execute(actions, pl))
except DependencyError as e:
print(f"ERROR: {e}")
return 2
db.set_playlist_last_sync(pid)
print(f"Applied actions for {pid}.")