]> git.lizzy.rs Git - cheatdb.git/commitdiff
Fix various issues
authorrubenwardy <rw@rubenwardy.com>
Fri, 21 Dec 2018 14:02:57 +0000 (14:02 +0000)
committerrubenwardy <rw@rubenwardy.com>
Fri, 21 Dec 2018 14:02:57 +0000 (14:02 +0000)
app/models.py
app/tasks/forumtasks.py
app/tasks/importtasks.py
requirements.txt

index 71b5a258f977ae50f358a7f5840c0625cdee5076..9bfe87a236923c90f316f12fc53893342a3bfdea 100644 (file)
@@ -406,7 +406,7 @@ class Package(db.Model):
                        "author": self.author.display_name,
                        "name": self.name,
                        "title": self.title,
-                       "short_descriptionesc": self.shortDesc,
+                       "short_description": self.shortDesc,
                        "desc": self.desc,
                        "type": self.type.toName(),
                        "created_at": self.created_at,
index dc8be7f7756eae8f422c38e7ba1fe554c282861d..8327a17eba67c2648fa600d76481a04038b9e41c 100644 (file)
@@ -74,7 +74,7 @@ def parseTitle(title):
 def getLinksFromModSearch():
        links = {}
 
-       contents = urllib.request.urlopen("http://krock-works.16mb.com/MTstuff/modList.php").read().decode("utf-8")
+       contents = urllib.request.urlopen("https://krock-works.uk.to/minetest/modList.php").read().decode("utf-8")
        for x in json.loads(contents):
                link = x.get("link")
                if link is not None:
@@ -127,15 +127,15 @@ def importTopicList():
                link = links_by_id.get(id)
 
                # Fill row
-               topic.topic_id   = id
+               topic.topic_id   = int(id)
                topic.author     = user
                topic.type       = info["type"]
                topic.title      = title
                topic.name       = name
                topic.link       = link
                topic.wip        = info["wip"]
-               topic.posts      = info["posts"]
-               topic.views      = info["views"]
+               topic.posts      = int(info["posts"])
+               topic.views      = int(info["views"])
                topic.created_at = info["date"]
 
        for p in Package.query.all():
index 9afc8b69f1ac4fd38f714461b005c1fae5d44e8d..c3f865750ba106b27acaff834dc0c74ea9706dbb 100644 (file)
@@ -66,7 +66,7 @@ def getKrockList():
        global krock_list_cache_by_name
 
        if krock_list_cache is None:
-               contents = urllib.request.urlopen("http://krock-works.16mb.com/MTstuff/modList.php").read().decode("utf-8")
+               contents = urllib.request.urlopen("https://krock-works.uk.to/minetest/modList.php").read().decode("utf-8")
                list = json.loads(contents)
 
                def h(x):
@@ -149,7 +149,8 @@ class PackageTreeNode:
                        type = PackageType.GAME
                elif os.path.isfile(baseDir + "/init.lua"):
                        type = PackageType.MOD
-               elif os.path.isfile(baseDir + "/modpack.txt"):
+               elif os.path.isfile(baseDir + "/modpack.txt") or \
+                               os.path.isfile(baseDir + "/modpack.conf"):
                        type = PackageType.MOD
                        is_modpack = True
                elif os.path.isdir(baseDir + "/mods"):
index c590e1feead5e72b5afabc2c1e41612863731683..861526e0d67999b402269a8f1cc2246e6985aa79 100644 (file)
@@ -6,7 +6,7 @@ Flask-Menu>=0.7.0
 Flask-Markdown>=0.3
 GitHub-Flask>=3.2.0
 pyScss==1.3.4
-celery==4.0.2
+celery==4.1.1
 redis==2.10.6
 beautifulsoup4==4.6.0
 lxml==4.2.1