feat 媒体文件同步删除插件:支持手动删除源文件同步处理下载任务

This commit is contained in:
jxxghp
2023-09-28 12:35:41 +08:00
parent 84d4c9cf73
commit 78b3135276
5 changed files with 52 additions and 26 deletions

View File

@ -74,6 +74,16 @@ class DownloadHistoryOper(DbOper):
"""
DownloadFiles.delete_by_fullpath(self._db, fullpath)
def get_hash_by_fullpath(self, fullpath: str) -> str:
"""
按fullpath查询下载文件记录hash
:param fullpath: 数据key
"""
fileinfo: DownloadFiles = DownloadFiles.get_by_fullpath(self._db, fullpath)
if fileinfo:
return fileinfo.download_hash
return ""
def list_by_page(self, page: int = 1, count: int = 30) -> List[DownloadHistory]:
"""
分页查询下载历史