diff --git a/db/file.py b/db/file.py index 5069495..4b0a8e5 100644 --- a/db/file.py +++ b/db/file.py @@ -49,7 +49,7 @@ def new(filename: str, pagenumber:int): def getMetadata(form: int, num: int, search:str = None): conn = util.getConn() c = conn.cursor() - if search is None: + if search == None: cursor = c.execute( "SELECT * FROM Metadata ORDER BY num desc LIMIT ?, ?", (form, num) ) diff --git a/file.py b/file.py index 6df224e..985bd3b 100644 --- a/file.py +++ b/file.py @@ -44,7 +44,7 @@ def raedZip(bookid: str, index: int): image_files = [ file for file in zip_ref.namelist() - if file.lower().endswith((".png", ".jpg", ".jpeg")) + if file.lower().endswith((".png", ".jpg", ".jpeg", ".gif", ".bmp", ".webp")) ] if not image_files: diff --git a/main.py b/main.py index 2490ead..ce271de 100644 --- a/main.py +++ b/main.py @@ -3,10 +3,10 @@ import db.util import db.file, file from flask import * -from web.api_Img import api_Img_bp -from web.page import page_bp -from web.admin_page import admin_page_bp -from web.api_comment import comment_api_bp +from router.api_Img import api_Img_bp +from router.page import page_bp +from router.admin_page import admin_page_bp +from router.api_comment import comment_api_bp app = Flask(__name__) diff --git a/web/admin_page.py b/router/admin_page.py similarity index 100% rename from web/admin_page.py rename to router/admin_page.py diff --git a/web/api_Img.py b/router/api_Img.py similarity index 100% rename from web/api_Img.py rename to router/api_Img.py diff --git a/web/api_comment.py b/router/api_comment.py similarity index 100% rename from web/api_comment.py rename to router/api_comment.py diff --git a/web/page.py b/router/page.py similarity index 100% rename from web/page.py rename to router/page.py