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

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]:
"""