Skip to content

Commit

Permalink
[patch] Version check handling
Browse files Browse the repository at this point in the history
  • Loading branch information
Feramance committed May 17, 2024
1 parent 7924f0e commit b1bf54f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions qBitrr/arss.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,14 +294,15 @@ def __init__(
self.client = client_cls(host_url=self.uri, api_key=self.apikey)
if isinstance(self.client, SonarrAPI):
self.type = "sonarr"
version_info = self.client.get_update()
self.version = version_parser.parse(version_info[0].get("version"))
self.logger.debug("%s version: %s", self._name, self.version.__str__())
elif isinstance(self.client, RadarrAPI):
self.type = "radarr"

try:
version_info = self.client.get_update()
self.version = version_parser.parse(version_info[0].get("version"))
self.logger.debug("%s version: %s", self._name, self.version.__str__())
except Exception:
self.logger.debug("Failed to get version")

if self.rss_sync_timer > 0:
self.rss_sync_timer_last_checked = datetime(1970, 1, 1)
Expand Down

0 comments on commit b1bf54f

Please sign in to comment.