fix douban
This commit is contained in:
parent
8a0acfbcee
commit
d9c75ce446
@ -161,6 +161,7 @@ class DoubanChain(ChainBase):
|
||||
mtype=mediainfo.type,
|
||||
tmdbid=mediainfo.tmdb_id,
|
||||
season=meta.begin_season,
|
||||
exist_ok=True,
|
||||
username="豆瓣想看")
|
||||
continue
|
||||
# 自动下载
|
||||
@ -177,6 +178,7 @@ class DoubanChain(ChainBase):
|
||||
mtype=mediainfo.type,
|
||||
tmdbid=mediainfo.tmdb_id,
|
||||
season=meta.begin_season,
|
||||
exist_ok=True,
|
||||
username="豆瓣想看")
|
||||
|
||||
logger.info(f"用户 {user_id} 豆瓣想看同步完成")
|
||||
|
@ -36,6 +36,7 @@ class SubscribeChain(ChainBase):
|
||||
season: int = None,
|
||||
userid: str = None,
|
||||
username: str = None,
|
||||
exist_ok: bool = False,
|
||||
**kwargs) -> Optional[int]:
|
||||
"""
|
||||
识别媒体信息并添加订阅
|
||||
@ -93,12 +94,13 @@ class SubscribeChain(ChainBase):
|
||||
sid, err_msg = self.subscribehelper.add(mediainfo, season=season, **kwargs)
|
||||
if not sid:
|
||||
logger.error(f'{mediainfo.title_year} {err_msg}')
|
||||
# 发回原用户
|
||||
self.post_message(title=f"{mediainfo.title_year}{metainfo.season} "
|
||||
f"添加订阅失败!",
|
||||
text=f"{err_msg}",
|
||||
image=mediainfo.get_message_image(),
|
||||
userid=userid)
|
||||
if not exist_ok:
|
||||
# 发回原用户
|
||||
self.post_message(title=f"{mediainfo.title_year}{metainfo.season} "
|
||||
f"添加订阅失败!",
|
||||
text=f"{err_msg}",
|
||||
image=mediainfo.get_message_image(),
|
||||
userid=userid)
|
||||
else:
|
||||
logger.info(f'{mediainfo.title_year}{metainfo.season} 添加订阅成功')
|
||||
# 广而告之
|
||||
|
@ -27,7 +27,7 @@ class SubscribeOper(DbOper):
|
||||
subscribe.create(self._db)
|
||||
return subscribe.id, "新增订阅成功"
|
||||
else:
|
||||
return subscribe.id, "订阅已存在"
|
||||
return 0, "订阅已存在"
|
||||
|
||||
def get(self, sid: int) -> Subscribe:
|
||||
"""
|
||||
|
Loading…
x
Reference in New Issue
Block a user