http: Reformat

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
2023-08-02 18:38:26 -07:00
parent f0cc2dd1bd
commit af3a8b9a1e
3 changed files with 4 additions and 2 deletions

View File

@@ -39,6 +39,7 @@ def get_db(db_path: str = DB_PATH):
);
"""
)
def dict_factory(cursor, row):
d = {}
for idx, col in enumerate(cursor.description):
@@ -100,7 +101,7 @@ def search_db(
"md5_like": f"%{md5}%",
"limit": limit,
"offset": limit * page,
}
},
)
return list(result.fetchall())

View File

@@ -9,6 +9,7 @@ from jinja2 import Environment, PackageLoader, select_autoescape
from . import config
from .db import get_db, search_db
# 2023-07-24 - eating stirfry tonight. It's pretty bad.
# 2023-07-31 - In a meeting. Hope I don't get caught

View File

@@ -75,7 +75,7 @@ async def pull():
post["op"] = "(OP)" in str(cols["post"])
if "thumb" in post:
thumb = post['thumb']
thumb = post["thumb"]
thumb_name = Path(thumb[:2], f"{post['thumb']}s.jpg")
thumb_path = Path(config.THUMBS_DIR, thumb_name)
download_jobs += [get_thumb(thumb_path, post)]