[58] fix version

pull/858/head
meisnate12 3 years ago
parent f1918c02f4
commit cacb62305f

@ -1 +1 @@
1.16.5-develop57
1.16.5-develop58

@ -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()

@ -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")

Loading…
Cancel
Save