feat 下载时记录文件清单

This commit is contained in:
jxxghp
2023-08-31 08:37:00 +08:00
parent f80e5739ca
commit 593211c037
8 changed files with 69 additions and 27 deletions

View File

@ -116,9 +116,9 @@ class DownloadFiles(Base):
return db.query(DownloadFiles).filter(DownloadFiles.download_hash == download_hash).all()
@staticmethod
def get_by_full_path(db: Session, fullpath: str):
def get_by_fullpath(db: Session, fullpath: str):
return db.query(DownloadFiles).filter(DownloadFiles.fullpath == fullpath).first()
@staticmethod
def get_by_save_path(db: Session, savepath: str):
def get_by_savepath(db: Session, savepath: str):
return db.query(DownloadFiles).filter(DownloadFiles.savepath == savepath).all()