aboutsummaryrefslogtreecommitdiffstats
path: root/gallery_dl/ytdl.py
diff options
context:
space:
mode:
Diffstat (limited to 'gallery_dl/ytdl.py')
-rw-r--r--gallery_dl/ytdl.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/gallery_dl/ytdl.py b/gallery_dl/ytdl.py
index fe88c2c..32545e2 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),