aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Hayden <alexhayden25@gmail.com>2019-10-06 21:55:57 -0400
committerAlexander Hayden <alexhayden25@gmail.com>2019-10-06 21:55:57 -0400
commit1b8a1a4ddfe5c6ff2649fe5d532b22e7bb656cd8 (patch)
tree778e4c058146e61bdb8af5f7e7f8577d055a7a37
parentd53dcca713658074845ab1748a2cb5a4ce5916bf (diff)
downloadmodpackman-1b8a1a4ddfe5c6ff2649fe5d532b22e7bb656cd8.tar.gz
modpackman-1b8a1a4ddfe5c6ff2649fe5d532b22e7bb656cd8.zip
Fix boi
-rwxr-xr-xupdate.py12
-rw-r--r--version.txt2
2 files changed, 10 insertions, 4 deletions
diff --git a/update.py b/update.py
index 2727306..953f994 100755
--- a/update.py
+++ b/update.py
@@ -5,7 +5,7 @@ import os
import sys
import hashlib
import shutil
-import regex as re
+import re
import requests
@@ -98,7 +98,10 @@ def apply_updates(args):
f.write("#VERSION " + str(VERSION + 1) + "\n")
for mod in mods:
print("Fetching {mod[0]}...".format(mod=mod))
- url = find_cdn(ffx, mod[1])
+ if 'curseforge' in mod[1]:
+ url = find_cdn(ffx, mod[1])
+ else:
+ url = requests.get(mod[1]).url
if url is None:
print('Failed to fetch {mod[0]}!'.format(mod=mod))
continue
@@ -126,7 +129,10 @@ def check_updates(args):
for mod in latest:
print("Checking for updates to {mod[0]}...".format(mod=mod), end="")
sys.stdout.flush() # takes care of line-buffered terminals
- url = find_cdn(ffx, mod[1])
+ if 'curseforge' in mod[1]:
+ url = find_cdn(ffx, mod[1])
+ else:
+ url = requests.get(mod[1]).url
if url in old_urls:
print(" No updates")
else:
diff --git a/version.txt b/version.txt
index 710d578..839d65f 100644
--- a/version.txt
+++ b/version.txt
@@ -1,4 +1,4 @@
# Format: <jarname> <hex digested sha1> <direct download url>
-#VERSION 32
+#VERSION 34
thaumcraft.jar fe0899048f1796df04e9727bbf1898df30492a00 https://media.forgecdn.net/files/2629/23/Thaumcraft-1.12.2-6.1.BETA26.jar
baubles.jar cb13fcfb18a9cb0cbd825fd5fe8d813c77368549 https://media.forgecdn.net/files/2518/667/Baubles-1.12-1.5.2.jar