refactor(db): optimize download history query logic

- 使用`TransferHistory.list_by`相同逻辑
This commit is contained in:
Attente
2025-04-19 20:22:37 +08:00
parent 3eefbf97b1
commit a8a70cac08
2 changed files with 38 additions and 28 deletions
+1
View File
@@ -113,6 +113,7 @@ class DownloadHistoryOper(DbOper):
season: Optional[str] = None, episode: Optional[str] = None, tmdbid=None) -> List[DownloadHistory]:
"""
按类型、标题、年份、季集查询下载记录
tmdbid + mtype 或 title + year
"""
return DownloadHistory.get_last_by(db=self._db,
mtype=mtype,