mirror of
https://github.com/yt-dlp/yt-dlp
synced 2025-01-01 06:21:09 +01:00
minor refactoring
This commit is contained in:
parent
9811496c24
commit
27238028f4
2 changed files with 5 additions and 3 deletions
|
@ -179,6 +179,8 @@ from .version import CHANNEL, ORIGIN, RELEASE_GIT_HEAD, VARIANT, __version__
|
|||
if compat_os_name == 'nt':
|
||||
import ctypes
|
||||
|
||||
__all__ = ['YoutubeDL']
|
||||
|
||||
|
||||
def _catch_unsafe_extension_error(func):
|
||||
@functools.wraps(func)
|
||||
|
|
|
@ -22,7 +22,7 @@ import urllib.parse
|
|||
import urllib.request
|
||||
import xml.etree.ElementTree
|
||||
|
||||
from .._globals import plugin_overrides
|
||||
from .._globals import plugin_overrides as _plugin_overrides
|
||||
from ..compat import (
|
||||
compat_etree_fromstring,
|
||||
compat_expanduser,
|
||||
|
@ -3941,13 +3941,13 @@ class InfoExtractor:
|
|||
while getattr(super_class, '__wrapped__', None):
|
||||
super_class = super_class.__wrapped__
|
||||
|
||||
if not any(override.PLUGIN_NAME == plugin_name for override in plugin_overrides.get()[super_class]):
|
||||
if not any(override.PLUGIN_NAME == plugin_name for override in _plugin_overrides.get()[super_class]):
|
||||
cls.__wrapped__ = next_mro_class
|
||||
cls.PLUGIN_NAME, cls.ie_key = plugin_name, next_mro_class.ie_key
|
||||
cls.IE_NAME = f'{next_mro_class.IE_NAME}+{plugin_name}'
|
||||
|
||||
setattr(sys.modules[super_class.__module__], super_class.__name__, cls)
|
||||
plugin_overrides.get()[super_class].append(cls)
|
||||
_plugin_overrides.get()[super_class].append(cls)
|
||||
return super().__init_subclass__(**kwargs)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue