From cacb62305f442d9f65d6c4a54141cdac28e700c8 Mon Sep 17 00:00:00 2001 From: meisnate12 Date: Tue, 3 May 2022 10:29:23 -0400 Subject: [PATCH] [58] fix version --- VERSION | 2 +- modules/config.py | 2 +- modules/util.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/VERSION b/VERSION index 4db59420..58061bdd 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.16.5-develop57 +1.16.5-develop58 diff --git a/modules/config.py b/modules/config.py index 1122f4f3..85b8a8dc 100644 --- a/modules/config.py +++ b/modules/config.py @@ -369,7 +369,7 @@ class ConfigFile: self.Webhooks = Webhooks(self, self.webhooks, notifiarr=self.NotifiarrFactory) try: self.Webhooks.start_time_hooks(self.start_time) - if self.version and self.latest_version and (self.version[1] != self.latest_version[1] or (self.version[2] and self.version[2] < self.latest_version[2])): + if self.version[0] != "Unknown" and self.latest_version[0] != "Unknown" and self.version[1] != self.latest_version[1] or (self.version[2] and self.version[2] < self.latest_version[2]): self.Webhooks.version_hooks(self.version, self.latest_version) except Failed as e: logger.stacktrace() diff --git a/modules/util.py b/modules/util.py index 90d95913..498399c1 100644 --- a/modules/util.py +++ b/modules/util.py @@ -108,11 +108,11 @@ def current_version(version, nightly=False): return get_version("master") def get_version(level): - url = f"https://raw.githubusercontent.com/meisnate12/Plex-Meta-Manager/{level}/VERSION" try: + url = f"https://raw.githubusercontent.com/meisnate12/Plex-Meta-Manager/{level}/VERSION" return parse_version(requests.get(url).content.decode().strip()) except requests.exceptions.ConnectionError: - return None + return "Unknown", "Unknown", 0 def parse_version(version): split_version = version.split("-develop")