[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) self.Webhooks = Webhooks(self, self.webhooks, notifiarr=self.NotifiarrFactory)
try: try:
self.Webhooks.start_time_hooks(self.start_time) 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) self.Webhooks.version_hooks(self.version, self.latest_version)
except Failed as e: except Failed as e:
logger.stacktrace() logger.stacktrace()

@ -108,11 +108,11 @@ def current_version(version, nightly=False):
return get_version("master") return get_version("master")
def get_version(level): def get_version(level):
url = f"https://raw.githubusercontent.com/meisnate12/Plex-Meta-Manager/{level}/VERSION"
try: try:
url = f"https://raw.githubusercontent.com/meisnate12/Plex-Meta-Manager/{level}/VERSION"
return parse_version(requests.get(url).content.decode().strip()) return parse_version(requests.get(url).content.decode().strip())
except requests.exceptions.ConnectionError: except requests.exceptions.ConnectionError:
return None return "Unknown", "Unknown", 0
def parse_version(version): def parse_version(version):
split_version = version.split("-develop") split_version = version.split("-develop")

Loading…
Cancel
Save