From 61290baf05daeec669c1f1472c8512bd669f6031 Mon Sep 17 00:00:00 2001 From: HobbitDur Date: Fri, 25 Oct 2024 17:03:26 +0200 Subject: [PATCH] fixing latest downloading canary --- modmanager.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modmanager.py b/modmanager.py index 591ef1d..58f42c1 100644 --- a/modmanager.py +++ b/modmanager.py @@ -152,7 +152,10 @@ def __get_github_url_file(self, mod: Mod, json_url="assets_url"): json_file = json_file.json() dd_url = "" if mod.info['git_tag'] == 'latest': - dd_url = json_file[0][json_url] + for el in json_file: + if el['tag_name'] != "canary" and el['tag_name'] != "prerelease" and el['tag_name'].count('.') >=2: + dd_url =el[json_url] + break else: # Searching the tag for el in json_file: if el['tag_name'] == mod.info['git_tag']: