[ytdl] update for yt-dlp changes
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright 2021-2022 Mike Fährmann
|
||||
# Copyright 2021-2023 Mike Fährmann
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License version 2 as
|
||||
@@ -199,13 +199,18 @@ def parse_command_line(module, argv):
|
||||
action += args
|
||||
yield action
|
||||
|
||||
if getattr(opts, "parse_metadata", None) is None:
|
||||
opts.parse_metadata = []
|
||||
if opts.metafromtitle is not None:
|
||||
opts.parse_metadata.append("title:%s" % opts.metafromtitle)
|
||||
if "pre_process" not in opts.parse_metadata:
|
||||
opts.parse_metadata["pre_process"] = []
|
||||
opts.parse_metadata["pre_process"].append(
|
||||
"title:%s" % opts.metafromtitle)
|
||||
opts.metafromtitle = None
|
||||
opts.parse_metadata = list(itertools.chain.from_iterable(map(
|
||||
metadataparser_actions, opts.parse_metadata)))
|
||||
|
||||
opts.parse_metadata = {
|
||||
k: list(itertools.chain.from_iterable(map(
|
||||
metadataparser_actions, v)))
|
||||
for k, v in opts.parse_metadata.items()
|
||||
}
|
||||
else:
|
||||
opts.parse_metadata = ()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user