]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/downloader/common.py
[compat] Add `functools.cached_property`
[yt-dlp.git] / yt_dlp / downloader / common.py
index 276675532f97eabd3cb768f595bef8902b260d22..d74692130db68eec96342b46bd87a2ba3bf7cff1 100644 (file)
@@ -11,6 +11,7 @@
     MultilinePrinter,
     QuietMultilinePrinter,
 )
+from ..compat import functools
 from ..utils import (
     NUMBER_RE,
     LockingUnsupportedError,
@@ -102,7 +103,7 @@ def to_screen(self, *args, **kargs):
 
     __to_screen = to_screen
 
-    @property
+    @functools.cached_property
     def FD_NAME(self):
         return re.sub(r'(?<!^)(?=[A-Z])', '_', type(self).__name__[:-2]).lower()