mirror of
https://github.com/darkzoul5/YoutubePlaylistSync.git
synced 2026-11-08 08:15:12 +02:00
feat: add “fail fast” dependency check
This commit is contained in:
1 parent
1ea4352737
commit
e4e342adf5
3 files changed
+30
-2
No files matched your search
+5
-1
@@ -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}.")
|
||||
|
||||
|
||||
Reference in new issue
Block a user