Update utility.py

This commit is contained in:
KnugiHK
2026-01-24 01:47:45 +08:00
parent f05e0d3451
commit 1694ae7dd9

View File

@@ -765,7 +765,7 @@ def check_jid_map(db: sqlite3.Connection) -> bool:
"""
cursor = db.cursor()
cursor.execute("SELECT name FROM sqlite_master WHERE type='table' AND name='jid_map'")
return cursor.fetchone()is not None
return cursor.fetchone() is not None
def get_jid_map_join(jid_map_exists: bool) -> str:
@@ -815,6 +815,7 @@ def get_transcription_selection(db: sqlite3.Connection) -> str:
else:
return "NULL AS transcription_text"
def setup_template(template: Optional[str], no_avatar: bool, experimental: bool = False) -> jinja2.Template:
"""
Sets up the Jinja2 template environment and loads the template.