@@ -39,6 +39,7 @@ def get_db(db_path: str = DB_PATH):
|
|||||||
);
|
);
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
|
|
||||||
def dict_factory(cursor, row):
|
def dict_factory(cursor, row):
|
||||||
d = {}
|
d = {}
|
||||||
for idx, col in enumerate(cursor.description):
|
for idx, col in enumerate(cursor.description):
|
||||||
@@ -100,7 +101,7 @@ def search_db(
|
|||||||
"md5_like": f"%{md5}%",
|
"md5_like": f"%{md5}%",
|
||||||
"limit": limit,
|
"limit": limit,
|
||||||
"offset": limit * page,
|
"offset": limit * page,
|
||||||
}
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
return list(result.fetchall())
|
return list(result.fetchall())
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ from jinja2 import Environment, PackageLoader, select_autoescape
|
|||||||
from . import config
|
from . import config
|
||||||
from .db import get_db, search_db
|
from .db import get_db, search_db
|
||||||
|
|
||||||
|
|
||||||
# 2023-07-24 - eating stirfry tonight. It's pretty bad.
|
# 2023-07-24 - eating stirfry tonight. It's pretty bad.
|
||||||
# 2023-07-31 - In a meeting. Hope I don't get caught
|
# 2023-07-31 - In a meeting. Hope I don't get caught
|
||||||
|
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ async def pull():
|
|||||||
post["op"] = "(OP)" in str(cols["post"])
|
post["op"] = "(OP)" in str(cols["post"])
|
||||||
|
|
||||||
if "thumb" in post:
|
if "thumb" in post:
|
||||||
thumb = post['thumb']
|
thumb = post["thumb"]
|
||||||
thumb_name = Path(thumb[:2], f"{post['thumb']}s.jpg")
|
thumb_name = Path(thumb[:2], f"{post['thumb']}s.jpg")
|
||||||
thumb_path = Path(config.THUMBS_DIR, thumb_name)
|
thumb_path = Path(config.THUMBS_DIR, thumb_name)
|
||||||
download_jobs += [get_thumb(thumb_path, post)]
|
download_jobs += [get_thumb(thumb_path, post)]
|
||||||
|
|||||||
Reference in New Issue
Block a user