mirror of
https://github.com/darkzoul5/YoutubePlaylistSync.git
synced 2026-09-22 06:12:21 +03:00
Implement non-interactive mode for PlaylistDownloader to support CI automation
This commit is contained in:
@@ -18,6 +18,8 @@ class PlaylistDownloader:
|
||||
# If the manager (or config) defines debug, prefer that
|
||||
if hasattr(config, "debug"):
|
||||
self.debug = bool(config.debug)
|
||||
# non-interactive mode for CI/automated runs
|
||||
self.non_interactive = bool(getattr(config, "non_interactive", False))
|
||||
|
||||
self.url = playlist.get("url")
|
||||
self.skip = False
|
||||
@@ -358,6 +360,9 @@ class PlaylistDownloader:
|
||||
self.logger.warning(" %s", f.name)
|
||||
|
||||
try:
|
||||
if self.non_interactive:
|
||||
confirm = "y"
|
||||
else:
|
||||
confirm = input("Delete these files? [y/N]: ").strip().lower()
|
||||
except EOFError:
|
||||
confirm = "n"
|
||||
|
||||
Reference in New Issue
Block a user