mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-25 02:45:12 +00:00
Bugfix for 3a408f9d19
This commit is contained in:
parent
2762dbb17e
commit
1a8cc83735
2 changed files with 6 additions and 4 deletions
|
@ -20,5 +20,7 @@ def __init__(self, func):
|
||||||
self.func = func
|
self.func = func
|
||||||
|
|
||||||
def __get__(self, instance, _):
|
def __get__(self, instance, _):
|
||||||
|
if instance is None:
|
||||||
|
return self
|
||||||
setattr(instance, self.func.__name__, self.func(instance))
|
setattr(instance, self.func.__name__, self.func(instance))
|
||||||
return getattr(instance, self.func.__name__)
|
return getattr(instance, self.func.__name__)
|
||||||
|
|
|
@ -11,11 +11,11 @@
|
||||||
MultilinePrinter,
|
MultilinePrinter,
|
||||||
QuietMultilinePrinter,
|
QuietMultilinePrinter,
|
||||||
)
|
)
|
||||||
from ..compat import functools
|
|
||||||
from ..utils import (
|
from ..utils import (
|
||||||
NUMBER_RE,
|
NUMBER_RE,
|
||||||
LockingUnsupportedError,
|
LockingUnsupportedError,
|
||||||
Namespace,
|
Namespace,
|
||||||
|
classproperty,
|
||||||
decodeArgument,
|
decodeArgument,
|
||||||
encodeFilename,
|
encodeFilename,
|
||||||
error_to_compat_str,
|
error_to_compat_str,
|
||||||
|
@ -103,9 +103,9 @@ def to_screen(self, *args, **kargs):
|
||||||
|
|
||||||
__to_screen = to_screen
|
__to_screen = to_screen
|
||||||
|
|
||||||
@functools.cached_property
|
@classproperty
|
||||||
def FD_NAME(self):
|
def FD_NAME(cls):
|
||||||
return re.sub(r'(?<!^)(?=[A-Z])', '_', type(self).__name__[:-2]).lower()
|
return re.sub(r'(?<!^)(?=[A-Z])', '_', cls.__name__[:-2]).lower()
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def format_seconds(seconds):
|
def format_seconds(seconds):
|
||||||
|
|
Loading…
Reference in a new issue