show warning msg if in daemon and silent mode
This commit is contained in:
parent
e7812ce210
commit
0ffe2966b0
|
@ -251,6 +251,9 @@ while True:
|
||||||
logger.error(line)
|
logger.error(line)
|
||||||
else:
|
else:
|
||||||
playlist_bar.write(line)
|
playlist_bar.write(line)
|
||||||
|
elif not args.silence_errors and args.daemon:
|
||||||
|
logger.error(f"{result['video_id']} failed due to error.")
|
||||||
|
|
||||||
if len(result['video_error_logger_msg']):
|
if len(result['video_error_logger_msg']):
|
||||||
errored_videos += 1
|
errored_videos += 1
|
||||||
|
|
||||||
|
|
|
@ -80,7 +80,7 @@ def download_video(args) -> dict:
|
||||||
ylogger = ytdl_logger(setup_file_logger(video['id'], kwargs['output_dir'] / f"[{video['id']}].log"))
|
ylogger = ytdl_logger(setup_file_logger(video['id'], kwargs['output_dir'] / f"[{video['id']}].log"))
|
||||||
kwargs['ydl_opts']['logger'] = ylogger
|
kwargs['ydl_opts']['logger'] = ylogger
|
||||||
yt_dlp = ydl.YDL(kwargs['ydl_opts'])
|
yt_dlp = ydl.YDL(kwargs['ydl_opts'])
|
||||||
output_dict = {'downloaded_video_id': None, 'blacklist_video_id': None, 'video_error_logger_msg': [], 'status_msg': [], 'logger_msg': []} # empty object
|
output_dict = {'downloaded_video_id': None, 'video_id': video['id'], 'video_error_logger_msg': [], 'status_msg': [], 'logger_msg': []} # empty object
|
||||||
start_time = time.time()
|
start_time = time.time()
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
Reference in New Issue