Skip to content

Commit a443ebe

Browse files
committed
Add log message for hooks import errors
1 parent 7302cb4 commit a443ebe

File tree

5 files changed

+11
-7
lines changed

5 files changed

+11
-7
lines changed

docker-compose.dev.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ version: "3.1"
22
services:
33
ydl_api_ng:
44
container_name: ydl_api_ng
5-
image: ydl_api_ng
5+
# image: ydl_api_ng
66
restart: unless-stopped
77
build:
88
context: .

download_manager.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,20 @@
1515

1616
try:
1717
from params import progress_hooks
18-
except ImportError:
18+
except ImportError as e:
19+
logging.warning(e)
1920
from setup import progress_hooks
2021

2122
try:
2223
from params import postprocessor_hooks
23-
except ImportError:
24+
except ImportError as e:
25+
logging.warning(e)
2426
from setup import postprocessor_hooks
2527

2628
try:
2729
from params import ydl_api_hooks
28-
except ImportError:
30+
except ImportError as e:
31+
logging.warning(e)
2932
from setup import ydl_api_hooks
3033

3134
from rq import get_current_job

params/postprocessor_hooks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# ydl_opts contains all the informations of the selected preset
88
# download_manager contains all the processed informations about the download
99
# config_manager contains all the parameters of the application
10-
# download contains the standart youtube-dlp object for postprocessor hooks
10+
# download contains the standard youtube-dlp object for postprocessor hooks
1111
###
1212

1313
def handler(ydl_opts, download_manager, config_manager, download, **kwargs):

params/progress_hooks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
# ydl_opts contains all the informations of the selected preset
1111
# download_manager contains all the processed informations about the download
1212
# config_manager contains all the parameters of the application
13-
# download contains the standart youtube-dlp object for progress hooks
13+
# download contains the standard youtube-dlp object for progress hooks
1414
###
1515

1616
def handler(ydl_opts, download_manager, config_manager, download, **kwargs):

process_utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616

1717
try:
1818
from params import ydl_api_hooks
19-
except ImportError:
19+
except ImportError as e:
20+
logging.warning(e)
2021
from setup import ydl_api_hooks
2122

2223
class ProcessUtils:

0 commit comments

Comments
 (0)