mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-09-03 16:45:17 +00:00
@ -6,12 +6,12 @@ from ..utils import Namespace
|
||||
|
||||
class MetadataParserPP(PostProcessor):
|
||||
def __init__(self, downloader, actions):
|
||||
super().__init__(self, downloader)
|
||||
super().__init__(downloader)
|
||||
self._actions = []
|
||||
for f in actions:
|
||||
action, *args = f
|
||||
assert action in self.Actions
|
||||
self._actions.append(action(*args))
|
||||
self._actions.append(action(self, *args))
|
||||
|
||||
@classmethod
|
||||
def validate_action(cls, action, *data):
|
||||
@ -21,7 +21,7 @@ class MetadataParserPP(PostProcessor):
|
||||
"""
|
||||
if action not in cls.Actions:
|
||||
raise ValueError(f'{action!r} is not a valid action')
|
||||
getattr(cls, action.value)(cls, *data) # So this can raise error to validate
|
||||
action(cls, *data) # So this can raise error to validate
|
||||
|
||||
@staticmethod
|
||||
def field_to_template(tmpl):
|
||||
|
Reference in New Issue
Block a user