fix #167
This commit is contained in:
parent
b68515e427
commit
84c21d65c7
@ -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:
|
||||||
"""
|
"""
|
||||||
|
@ -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,
|
||||||
@ -515,7 +515,7 @@ class RssSubscribe(_PluginBase):
|
|||||||
# 检查是否在订阅中
|
# 检查是否在订阅中
|
||||||
subflag = self.subscribechain.exists(mediainfo=mediainfo, meta=meta)
|
subflag = self.subscribechain.exists(mediainfo=mediainfo, meta=meta)
|
||||||
if subflag:
|
if subflag:
|
||||||
logger.info(f'{mediainfo.title_year}{meta.season} 正在订阅中')
|
logger.info(f'{mediainfo.title_year} {meta.season} 正在订阅中')
|
||||||
continue
|
continue
|
||||||
# 添加订阅
|
# 添加订阅
|
||||||
self.subscribechain.add(title=mediainfo.title,
|
self.subscribechain.add(title=mediainfo.title,
|
||||||
@ -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(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user