added variable for file name. Also updated requirements to latest versions.
This commit is contained in:
9
main.py
9
main.py
@@ -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 = {}
|
||||
|
||||
Reference in New Issue
Block a user