支持读取历史记录

This commit is contained in:
2024-03-09 21:15:23 +08:00
parent f980b45703
commit 8b2fc97f4e
2 changed files with 12 additions and 2 deletions

View File

@@ -42,3 +42,9 @@ class NovelCiwei:
'SELECT * FROM catalog1 WHERE chapter_id = ?;', [str(chapter_id)])
cur.row_factory = sqlite3.Row
return cur.fetchone()
def get_read_history(self):
cur = self._db.execute(
'SELECT * FROM read_history ORDER BY readtime DESC;')
cur.row_factory = sqlite3.Row
return cur.fetchall()