fix 优雅停止

This commit is contained in:
jxxghp
2023-06-08 09:52:18 +08:00
parent a99cd77b68
commit e3a12e856a
8 changed files with 78 additions and 31 deletions

View File

@ -379,7 +379,7 @@ class CommonChain(_ChainBase):
exist_seasons = exists_tvs.get("seasons")
if exist_seasons.get(season):
# 取差集
episodes = set(episodes).difference(set(exist_seasons['season']))
episodes = set(episodes).difference(set(exist_seasons[season]))
# 添加不存在的季集信息
__append_no_exists(season, episodes)
# 存在不完整的剧集

View File

@ -12,7 +12,7 @@ from app.log import logger
class DoubanSyncChain(_ChainBase):
"""
同步豆瓣看数据
同步豆瓣看数据
"""
_interests_url: str = "https://www.douban.com/feed/people/%s/interests"
@ -28,7 +28,7 @@ class DoubanSyncChain(_ChainBase):
def process(self):
"""
通过用户RSS同步豆瓣看数据
通过用户RSS同步豆瓣看数据
"""
if not settings.DOUBAN_USER_IDS:
return
@ -97,9 +97,9 @@ class DoubanSyncChain(_ChainBase):
# 订阅成功
self.common.post_message(
title=f"{mediainfo.get_title_string()} 已添加订阅",
text="来自:豆瓣",
text="来自:豆瓣",
image=mediainfo.get_message_image())
logger.info(f"用户 {user_id} 豆瓣看同步完成")
logger.info(f"用户 {user_id} 豆瓣看同步完成")
# 保存缓存
self._cache_path.write_text("\n".join(caches))