From bc2666214800f87d229f90317eb07097e55e403d Mon Sep 17 00:00:00 2001 From: Feramance Date: Thu, 5 Dec 2024 12:33:22 +0100 Subject: [PATCH] [patch] Quality profile change error handling when defined incorrectly --- qBitrr/arss.py | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/qBitrr/arss.py b/qBitrr/arss.py index 8ec6f71f..3442265c 100755 --- a/qBitrr/arss.py +++ b/qBitrr/arss.py @@ -2349,18 +2349,19 @@ def db_update_single_series( self.logger.warning( "Check quality profile settings for %s", db_entry["title"] ) - while True: - try: - self.api_call_count += 1 - self.client.upd_episode(episode["id"], data) - break - except ( - requests.exceptions.ChunkedEncodingError, - requests.exceptions.ContentDecodingError, - requests.exceptions.ConnectionError, - JSONDecodeError, - ): - continue + if data: + while True: + try: + self.api_call_count += 1 + self.client.upd_episode(episode["id"], data) + break + except ( + requests.exceptions.ChunkedEncodingError, + requests.exceptions.ContentDecodingError, + requests.exceptions.ConnectionError, + JSONDecodeError, + ): + continue EntryId = episode["id"] SeriesTitle = episode.get("series", {}).get("title")