aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubenwardy <rw@rubenwardy.com>2018-12-21 14:02:57 +0000
committerrubenwardy <rw@rubenwardy.com>2018-12-21 14:02:57 +0000
commitdd368d87aa926ef2676b22ccee95934a38be7fac (patch)
treed449b9e68053084710156c668230d24605cda795
parente5b279d0139e4371eb22dbf1341bcf7089afc7ca (diff)
downloadcheatdb-dd368d87aa926ef2676b22ccee95934a38be7fac.tar.xz
Fix various issues
-rw-r--r--app/models.py2
-rw-r--r--app/tasks/forumtasks.py8
-rw-r--r--app/tasks/importtasks.py5
-rw-r--r--requirements.txt2
4 files changed, 9 insertions, 8 deletions
diff --git a/app/models.py b/app/models.py
index 71b5a25..9bfe87a 100644
--- a/app/models.py
+++ b/app/models.py
@@ -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,
diff --git a/app/tasks/forumtasks.py b/app/tasks/forumtasks.py
index dc8be7f..8327a17 100644
--- a/app/tasks/forumtasks.py
+++ b/app/tasks/forumtasks.py
@@ -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():
diff --git a/app/tasks/importtasks.py b/app/tasks/importtasks.py
index 9afc8b6..c3f8657 100644
--- a/app/tasks/importtasks.py
+++ b/app/tasks/importtasks.py
@@ -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"):
diff --git a/requirements.txt b/requirements.txt
index c590e1f..861526e 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -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