fix 自定义订阅 Api

This commit is contained in:
jxxghp
2023-08-10 12:41:38 +08:00
parent eea508b05a
commit eb9ec11153
16 changed files with 141 additions and 73 deletions
+2
View File
@@ -43,6 +43,8 @@ class Rss(Base):
proxy = Column(Integer)
# 保存路径
save_path = Column(String)
# 已处理数量
processed = Column(Integer)
# 附加信息,已处理数据
note = Column(String)
# 最后更新时间
+8 -5
View File
@@ -17,11 +17,14 @@ class RssOper(DbOper):
新增RSS订阅
"""
item = Rss(**kwargs)
if not item.get_by_tmdbid(self._db, tmdbid=kwargs.get("tmdbid"),
season=kwargs.get("season")):
item.create(self._db)
return True
return False
item.create(self._db)
return True
def exists(self, tmdbid: int, season: int = None):
"""
判断是否存在
"""
return Rss.get_by_tmdbid(self._db, tmdbid, season)
def list(self) -> List[Rss]:
"""