Skip to content

Commit

Permalink
[ytdl] fix AttributeError caused by 'decodeOption()' removal
Browse files Browse the repository at this point in the history
in yt-dlp 2024.11.18
  • Loading branch information
mikf committed Nov 18, 2024
1 parent b069783 commit 00fe1c8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions gallery_dl/ytdl.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -355,8 +356,8 @@ def metadataparser_actions(f):
"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),
Expand Down

0 comments on commit 00fe1c8

Please sign in to comment.