1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-11-01 23:25:14 +00:00

Create ydl._request_director when needed

This commit is contained in:
pukkandan
2024-02-25 06:03:57 +05:30
parent 5eedc208ec
commit 069b2aedae
2 changed files with 6 additions and 1 deletions

View File

@@ -68,6 +68,7 @@ class RequestDirector:
def close(self):
for handler in self.handlers.values():
handler.close()
self.handlers = {}
def add_handler(self, handler: RequestHandler):
"""Add a handler. If a handler of the same RH_KEY exists, it will overwrite it"""