From 00fe1c81b2721eb765fbe78003d92ad6ab339c68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Mon, 18 Nov 2024 16:04:13 +0100 Subject: [PATCH] [ytdl] fix AttributeError caused by 'decodeOption()' removal in yt-dlp 2024.11.18 --- gallery_dl/ytdl.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gallery_dl/ytdl.py b/gallery_dl/ytdl.py index fe88c2cb..32545e26 100644 --- a/gallery_dl/ytdl.py +++ b/gallery_dl/ytdl.py @@ -134,6 +134,7 @@ def parse_command_line(module, argv): else: date = module.DateRange(opts.dateafter, opts.datebefore) + decodeOption = getattr(module, "decodeOption", util.identity) compat_opts = getattr(opts, "compat_opts", ()) def _unused_compat_opt(name): @@ -355,8 +356,8 @@ def parse_command_line(module, argv): "allsubtitles": opts.allsubtitles, "subtitlesformat": opts.subtitlesformat, "subtitleslangs": opts.subtitleslangs, - "matchtitle": module.decodeOption(opts.matchtitle), - "rejecttitle": module.decodeOption(opts.rejecttitle), + "matchtitle": decodeOption(opts.matchtitle), + "rejecttitle": decodeOption(opts.rejecttitle), "max_downloads": opts.max_downloads, "prefer_free_formats": opts.prefer_free_formats, "trim_file_name": getattr(opts, "trim_file_name", None),