This commit is contained in:
jxxghp
2023-08-09 08:29:59 +08:00
parent 293b992ac0
commit d16c7b3133
4 changed files with 123 additions and 5 deletions

View File

@ -31,6 +31,8 @@ class Rss(Base):
vote = Column(Integer)
# 简介
description = Column(String)
# 总集数
total_episode = Column(Integer)
# 包含
include = Column(String)
# 排除
@ -46,7 +48,7 @@ class Rss(Base):
# 最后更新时间
last_update = Column(String)
# 状态 0-停用1-启用
state = Column(Integer)
state = Column(Integer, default=1)
@staticmethod
def get_by_tmdbid(db: Session, tmdbid: int, season: int = None):

View File

@ -38,3 +38,13 @@ class RssOper(DbOper):
item.delete(self._db)
return True
return False
def update(self, rssid: int, **kwargs) -> bool:
"""
更新RSS订阅
"""
item = Rss.get(self._db, rssid)
if item:
item.update(self._db, kwargs)
return True
return False