added variable for file name. Also updated requirements to latest versions.

This commit is contained in:
2020-05-23 00:23:00 -04:00
parent 29b374c57f
commit f8acfbb751
2 changed files with 10 additions and 11 deletions

View File

@@ -6,6 +6,7 @@ import subprocess
from waitress import serve
PATH = '/download'
FILE = '/tach.json'
app = Flask(__name__,
template_folder="templates")
@@ -79,8 +80,7 @@ def upload_jason():
z = 0
added = []
with open(PATH+"/tach.json", "r") as tf:
# with open("tach.json", "r") as tf:
with open(PATH + FILE, "r") as tf:
data = json.load(tf)
for x in data["mangas"]:
# Manga Name
@@ -178,8 +178,7 @@ def ood():
y = 0
z = 0
with open(PATH + "/tach.json", "r") as tf:
# with open("tach.json", "r") as tf:
with open(PATH + FILE, "r") as tf:
data = json.load(tf)
for x in data["mangas"]:
# Manga Name
@@ -217,7 +216,7 @@ def test():
mangaInfo=[]
mangaName = manga.query.all()
with open(PATH + "/tach.json", "r") as tf:
with open(PATH + FILE, "r") as tf:
data = json.load(tf)
for x in data["mangas"]:
watchedManga = {}