diff --git a/app/chain/message.py b/app/chain/message.py index 212ddbda..2fc011ba 100644 --- a/app/chain/message.py +++ b/app/chain/message.py @@ -214,6 +214,11 @@ class MessageChain(ChainBase): start = _current_page * self._page_size end = start + self._page_size if cache_type == "Torrent": + # 更新缓存 + user_cache[userid] = { + "type": "Torrent", + "items": cache_list[start:end] + } # 发送种子数据 self.__post_torrents_message(channel=channel, title=_current_media.title, @@ -251,6 +256,11 @@ class MessageChain(ChainBase): # 加一页 _current_page += 1 if cache_type == "Torrent": + # 更新缓存 + user_cache[userid] = { + "type": "Torrent", + "items": cache_list + } # 发送种子数据 self.__post_torrents_message(channel=channel, title=_current_media.title, diff --git a/app/plugins/speedlimiter/__init__.py b/app/plugins/speedlimiter/__init__.py index 4ba885ff..390d43a4 100644 --- a/app/plugins/speedlimiter/__init__.py +++ b/app/plugins/speedlimiter/__init__.py @@ -69,6 +69,7 @@ class SpeedLimiter(_PluginBase): self._play_down_speed = float(config.get("play_down_speed")) if config.get("play_down_speed") else 0 self._noplay_up_speed = float(config.get("noplay_up_speed")) if config.get("noplay_up_speed") else 0 self._noplay_down_speed = float(config.get("noplay_down_speed")) if config.get("noplay_down_speed") else 0 + self._current_state = f"U:{self._noplay_up_speed},D:{self._noplay_down_speed}" try: # 总带宽 self._bandwidth = int(float(config.get("bandwidth") or 0)) * 1000000