update:更新Router结构,和启动脚本文件

This commit is contained in:
Kakune55 2024-12-25 08:43:18 +08:00
parent 86a47a8aab
commit dbcb6a79de
7 changed files with 6 additions and 6 deletions

View File

@ -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)
)

View File

@ -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:

View File

@ -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__)