Define then update *_hook dictionaries
This commit is contained in:
1 parent
75df4a57e3
commit
3c4849551b
1 file changed
+12
-6
+12
-6
@@ -5,6 +5,14 @@ from common.logger import log
|
|||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
|
|
||||||
|
|
||||||
|
progress_hook = {
|
||||||
|
'status': dict(),
|
||||||
|
}
|
||||||
|
|
||||||
|
postprocessor_hook = {
|
||||||
|
'status': dict(),
|
||||||
|
}
|
||||||
|
|
||||||
class BaseStatus:
|
class BaseStatus:
|
||||||
valid = set()
|
valid = set()
|
||||||
|
|
||||||
@@ -158,15 +166,13 @@ def yt_dlp_postprocessor_hook(event):
|
|||||||
status.cleanup()
|
status.cleanup()
|
||||||
|
|
||||||
|
|
||||||
progress_hook = {
|
progress_hook.update({
|
||||||
'class': ProgressHookStatus(),
|
'class': ProgressHookStatus(),
|
||||||
'function': yt_dlp_progress_hook,
|
'function': yt_dlp_progress_hook,
|
||||||
'status': dict(),
|
})
|
||||||
}
|
|
||||||
|
|
||||||
postprocessor_hook = {
|
postprocessor_hook.update({
|
||||||
'class': PPHookStatus(),
|
'class': PPHookStatus(),
|
||||||
'function': yt_dlp_postprocessor_hook,
|
'function': yt_dlp_postprocessor_hook,
|
||||||
'status': dict(),
|
})
|
||||||
}
|
|
||||||
|
|
||||||
Reference in new issue
Block a user