fix 豆瓣已订阅显示

This commit is contained in:
jxxghp
2023-11-13 20:25:57 +08:00
parent 61d71b32ff
commit 5a07732712
2 changed files with 7 additions and 2 deletions

View File

@ -97,7 +97,10 @@ class Subscribe(Base):
@staticmethod
@db_query
def get_by_title(db: Session, title: str):
def get_by_title(db: Session, title: str, season: int = None):
if season:
return db.query(Subscribe).filter(Subscribe.name == title,
Subscribe.season == season).first()
return db.query(Subscribe).filter(Subscribe.name == title).first()
@staticmethod