From 2cc94cec02b7f25625d2b9be6b8a29761621d6b3 Mon Sep 17 00:00:00 2001 From: thsrite Date: Wed, 26 Mar 2025 09:19:15 +0800 Subject: [PATCH] fix --- plugins/subscribereminder/__init__.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/plugins/subscribereminder/__init__.py b/plugins/subscribereminder/__init__.py index 7ffcd61..9d077a9 100644 --- a/plugins/subscribereminder/__init__.py +++ b/plugins/subscribereminder/__init__.py @@ -192,16 +192,19 @@ class SubscribeReminder(_PluginBase): # 处理电影订阅 if "movie" in self._subtype and current_movie_subscribe: text = "" + image = [] count = 0 for sub in current_movie_subscribe: text += f"📽︎{sub.get('name')}\n" count += 1 + image.append(sub.get('image')) if count % 8 == 0: # 每8条发送一次 self.post_message(mtype=mtype, title="电影更新", text=text, - image=random.choice(current_movie_subscribe)["image"]) + image=random.choice(image)) text = "" # 重置text变量以开始新的消息 + image = [] logger.info(f"推送电影更新:{text}") # 如果还有剩余未发送的内容 @@ -209,7 +212,7 @@ class SubscribeReminder(_PluginBase): self.post_message(mtype=mtype, title="电影更新", text=text, - image=random.choice(current_movie_subscribe)["image"]) + image=random.choice(image)) logger.info(f"推送电影更新:{text}") def get_state(self) -> bool: