fix DirMonitor

This commit is contained in:
jxxghp
2023-08-03 20:35:08 +08:00
parent dcbf9c0b20
commit ddab39da92
11 changed files with 382 additions and 52 deletions

View File

@ -30,7 +30,7 @@ class TransferHistory(Base):
tvdbid = Column(Integer)
doubanid = Column(String)
# Sxx
seasons = Column(Integer)
seasons = Column(String)
# Exx
episodes = Column(String)
# 海报
@ -59,6 +59,10 @@ class TransferHistory(Base):
def get_by_hash(db: Session, download_hash: str):
return db.query(TransferHistory).filter(TransferHistory.download_hash == download_hash).first()
@staticmethod
def get_by_src(db: Session, src: str):
return db.query(TransferHistory).filter(TransferHistory.src == src).first()
@staticmethod
def statistic(db: Session, days: int = 7):
"""