diff --git a/app/library/Utils.py b/app/library/Utils.py index 74c3d613..ce8c412e 100644 --- a/app/library/Utils.py +++ b/app/library/Utils.py @@ -388,6 +388,10 @@ def arg_converter( default_opts = _default_opts([]).ydl_opts + if args: + # important to ignore external config files. + args = "--ignore-config " + args + opts = yt_dlp.parse_options(shlex.split(args)).ydl_opts diff = {k: v for k, v in opts.items() if default_opts[k] != v} if not keep_defaults else opts.items() if "postprocessors" in diff: diff --git a/app/library/config.py b/app/library/config.py index fcbf77bb..cb803331 100644 --- a/app/library/config.py +++ b/app/library/config.py @@ -384,23 +384,16 @@ class Config: except Exception as e: LOG.error(f"Error starting debugpy server at '0.0.0.0:{self.debugpy_port}'. {e}") - ytdl_options = {} opts_file: Path = Path(self.config_path) / "ytdlp.cli" if opts_file.exists() and opts_file.stat().st_size > 2: - LOG.info(f"Loading yt-dlp custom options from '{opts_file}'.") + LOG.error("The global config file 'ytdlp.cli' file is deprecated and will be removed in future releases.") with open(opts_file) as f: self.ytdlp_cli = f.read().strip() if self.ytdlp_cli: self._ytdlp_cli_mutable = self.ytdlp_cli try: - removed_options = [] - ytdl_options = arg_converter(args=self.ytdlp_cli, level=True, removed_options=removed_options) - - try: - LOG.debug("Parsed yt-dlp cli options '%s'.", ytdl_options) - except Exception: - pass - + removed_options: list = [] + arg_converter(args=self.ytdlp_cli, level=True, removed_options=removed_options) if len(removed_options) > 0: LOG.warning( "Removed the following options: '%s' from '%s'", ", ".join(removed_options), opts_file @@ -410,8 +403,6 @@ class Config: raise ValueError(msg) from e else: LOG.warning(f"Empty yt-dlp custom options file '{opts_file}'.") - else: - LOG.info(f"No yt-dlp custom options found at '{opts_file}'.") self._ytdlp_cli_mutable += f"\n--socket-timeout {self.socket_timeout}" diff --git a/ui/app/components/DeprecatedNotice.vue b/ui/app/components/DeprecatedNotice.vue new file mode 100644 index 00000000..4dc045be --- /dev/null +++ b/ui/app/components/DeprecatedNotice.vue @@ -0,0 +1,67 @@ + + + diff --git a/ui/app/pages/index.vue b/ui/app/pages/index.vue index 771625c3..aa4854c9 100644 --- a/ui/app/pages/index.vue +++ b/ui/app/pages/index.vue @@ -63,6 +63,38 @@ +
+
+ +

+ The following environment variables and features are deprecated and will be removed in future releases: +

+
    +
  • + The environment variables YTP_KEEP_ARCHIVE and YTP_SOCKET_TIMEOUT will no + longer be user-configurable. Their behavior will be part of the default presets. To keep + your current behavior and avoid re-downloading, please add the following Command + options for yt-dlp to your presets: + --socket-timeout 30 --download-archive /config/archive.log +
  • +
  • + The global yt-dlp config file /config/ytdlp.cli is deprecated and will be removed. Please + migrate any global options into your presets. +
  • +
  • + The Basic mode (which limited the interface to the new download form) is being removed. + Everything except what is available behind configurable flag will become part of the standard interface. +
  • +
+

+ These changes help reduce confusion from multiple sources of truth. Going forward, presets + and the Command options for yt-dlp will be the single source of truth. +

+
+
+
+ @@ -81,6 +113,7 @@