This commit is contained in:
Cyberes 2023-01-21 17:13:50 -07:00
parent e363690960
commit b1bd13e25f
No known key found for this signature in database
GPG Key ID: 194A1C358AACFC39
2 changed files with 3 additions and 2 deletions

View File

@ -36,6 +36,7 @@ parser.add_argument('--rm-cache', '-r', action='store_true', help='Delete the yt
parser.add_argument('--threads', type=int, default=cpu_count(), help='How many download processes to use.')
parser.add_argument('--daemon', '-d', action='store_true', help="Run in daemon mode. Disables progress bars sleeps for the amount of time specified in --sleep.")
parser.add_argument('--sleep', type=float, default=60, help='How many minutes to sleep when in daemon mode.')
parser.add_argument('--silence-errors', '-s', action='store_true', help="Don't print any error messages to the console.")
args = parser.parse_args()
if args.threads <= 0:

View File

@ -90,9 +90,9 @@ def download_video(args) -> dict:
output_dict['logger_msg'].append(f"{video['id']} '{video['title']}' downloaded in {elapsed} min.")
output_dict['downloaded_video_id'] = video['id']
else:
m = f'{video["id"]} {video["title"]} -> Failed to download, error code: {error_code}'
# m = f'{video["id"]} {video["title"]} -> Failed to download, error code: {error_code}'
# output_dict['status_msg'].append(m)
output_dict['video_error_logger_msg'].append(m)
# output_dict['video_error_logger_msg'].append(m)
output_dict['video_error_logger_msg'] = output_dict['video_error_logger_msg'] + ylogger.errors
except Exception as e:
output_dict['video_error_logger_msg'].append(f"{video['id']} {video['title']} -> {e}")