This commit is contained in:
jxxghp 2023-08-19 08:35:32 +08:00
parent b68515e427
commit 84c21d65c7
2 changed files with 7 additions and 3 deletions

View File

@ -36,7 +36,10 @@ class SubscribeOper(DbOper):
""" """
判断是否存在 判断是否存在
""" """
if season:
return True if Subscribe.exists(self._db, tmdbid=tmdbid, season=season) else False return True if Subscribe.exists(self._db, tmdbid=tmdbid, season=season) else False
else:
return True if Subscribe.exists(self._db, tmdbid=tmdbid) else False
def get(self, sid: int) -> Subscribe: def get(self, sid: int) -> Subscribe:
""" """

View File

@ -486,7 +486,7 @@ class RssSubscribe(_PluginBase):
title = result.get("title") title = result.get("title")
description = result.get("description") description = result.get("description")
# 检查是否处理过 # 检查是否处理过
if not title or title in [h.get("title") for h in history]: if not title or title in [h.get("key") for h in history]:
continue continue
# 检查规则 # 检查规则
if self._include and not re.search(r"%s" % self._include, if self._include and not re.search(r"%s" % self._include,
@ -528,6 +528,7 @@ class RssSubscribe(_PluginBase):
# 存储历史记录 # 存储历史记录
history.append({ history.append({
"title": f"{mediainfo.title} {meta.season}", "title": f"{mediainfo.title} {meta.season}",
"key": f"{title}",
"type": mediainfo.type.value, "type": mediainfo.type.value,
"year": mediainfo.year, "year": mediainfo.year,
"poster": mediainfo.get_poster_image(), "poster": mediainfo.get_poster_image(),