fix 优化部分消息格式
This commit is contained in:
parent
3ef9c5ea2c
commit
15bdb694cc
@ -370,11 +370,11 @@ class SiteChain(ChainBase):
|
|||||||
if site.render:
|
if site.render:
|
||||||
render_str = "🧭"
|
render_str = "🧭"
|
||||||
else:
|
else:
|
||||||
render_str = "⚠️"
|
render_str = ""
|
||||||
if site.is_active:
|
if site.is_active:
|
||||||
messages.append(f"{site.id}. {site.name} {render_str}")
|
messages.append(f"{site.id}. {site.name} {render_str}")
|
||||||
else:
|
else:
|
||||||
messages.append(f"{site.id}. {site.name} ")
|
messages.append(f"{site.id}. {site.name} ⚠️")
|
||||||
# 发送列表
|
# 发送列表
|
||||||
self.post_message(Notification(
|
self.post_message(Notification(
|
||||||
channel=channel,
|
channel=channel,
|
||||||
|
@ -856,39 +856,18 @@ class SubscribeChain(ChainBase):
|
|||||||
f"\n- 删除订阅:/subscribe_delete [id]" \
|
f"\n- 删除订阅:/subscribe_delete [id]" \
|
||||||
f"\n- 搜索订阅:/subscribe_search [id]" \
|
f"\n- 搜索订阅:/subscribe_search [id]" \
|
||||||
f"\n- 刷新订阅:/subscribe_refresh"
|
f"\n- 刷新订阅:/subscribe_refresh"
|
||||||
medias = []
|
messages = []
|
||||||
for subscribe in subscribes:
|
for subscribe in subscribes:
|
||||||
media = MediaInfo()
|
|
||||||
if subscribe.type == MediaType.MOVIE.value:
|
if subscribe.type == MediaType.MOVIE.value:
|
||||||
media.from_dict({
|
messages.append(f"{subscribe.id}. {subscribe.name}({subscribe.year})")
|
||||||
"type": subscribe.type,
|
|
||||||
"title": subscribe.name,
|
|
||||||
"year": subscribe.year,
|
|
||||||
"tmdb_id": subscribe.tmdbid,
|
|
||||||
"backdrop_path": subscribe.backdrop,
|
|
||||||
"poster_path": subscribe.poster,
|
|
||||||
"vote_average": subscribe.vote,
|
|
||||||
"overview": subscribe.description,
|
|
||||||
})
|
|
||||||
else:
|
else:
|
||||||
media.from_dict({
|
messages.append(f"{subscribe.id}. {subscribe.name}({subscribe.year})"
|
||||||
"type": subscribe.type,
|
f"第{subscribe.season}季 "
|
||||||
"name": subscribe.name,
|
f"[{subscribe.total_episode - (subscribe.lack_episode or subscribe.total_episode)}"
|
||||||
"year": subscribe.year,
|
f"/{subscribe.total_episode}]")
|
||||||
"tmdb_id": subscribe.tmdbid,
|
|
||||||
"backdrop_path": subscribe.backdrop,
|
|
||||||
"poster_path": subscribe.poster,
|
|
||||||
"vote_average": f"{subscribe.total_episode - (subscribe.lack_episode or subscribe.total_episode)}"
|
|
||||||
f"/{subscribe.total_episode}",
|
|
||||||
"overview": subscribe.description,
|
|
||||||
"season": subscribe.season
|
|
||||||
})
|
|
||||||
medias.append(media)
|
|
||||||
# 发送列表
|
# 发送列表
|
||||||
self.post_medias_message(
|
self.post_message(Notification(channel=channel,
|
||||||
message=Notification(channel=channel, title=title, userid=userid),
|
title=title, text='\n'.join(messages), userid=userid))
|
||||||
medias=medias
|
|
||||||
)
|
|
||||||
|
|
||||||
def remote_delete(self, arg_str: str, channel: MessageChannel, userid: Union[str, int] = None):
|
def remote_delete(self, arg_str: str, channel: MessageChannel, userid: Union[str, int] = None):
|
||||||
"""
|
"""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user