From c7457e94ac1f27c04f912a086b9cc766f4ab5882 Mon Sep 17 00:00:00 2001 From: tcely Date: Tue, 7 Jan 2025 05:58:50 -0500 Subject: [PATCH] Check that the drop_key exists --- tubesync/sync/utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tubesync/sync/utils.py b/tubesync/sync/utils.py index 8e98857e..f73e243b 100644 --- a/tubesync/sync/utils.py +++ b/tubesync/sync/utils.py @@ -226,7 +226,8 @@ def filter_response(response_dict): if key in response_dict.keys(): for format in response_dict[key]: for drop_key in drop_keys: - del format[drop_key] + if drop_key in format.keys(): + del format[drop_key] # end of formats cleanup }}} # beginning of subtitles cleanup {{{