Merge pull request #540 from thsrite/main
This commit is contained in:
commit
1f76dc1e2a
@ -214,6 +214,11 @@ class MessageChain(ChainBase):
|
|||||||
start = _current_page * self._page_size
|
start = _current_page * self._page_size
|
||||||
end = start + self._page_size
|
end = start + self._page_size
|
||||||
if cache_type == "Torrent":
|
if cache_type == "Torrent":
|
||||||
|
# 更新缓存
|
||||||
|
user_cache[userid] = {
|
||||||
|
"type": "Torrent",
|
||||||
|
"items": cache_list[start:end]
|
||||||
|
}
|
||||||
# 发送种子数据
|
# 发送种子数据
|
||||||
self.__post_torrents_message(channel=channel,
|
self.__post_torrents_message(channel=channel,
|
||||||
title=_current_media.title,
|
title=_current_media.title,
|
||||||
@ -251,6 +256,11 @@ class MessageChain(ChainBase):
|
|||||||
# 加一页
|
# 加一页
|
||||||
_current_page += 1
|
_current_page += 1
|
||||||
if cache_type == "Torrent":
|
if cache_type == "Torrent":
|
||||||
|
# 更新缓存
|
||||||
|
user_cache[userid] = {
|
||||||
|
"type": "Torrent",
|
||||||
|
"items": cache_list
|
||||||
|
}
|
||||||
# 发送种子数据
|
# 发送种子数据
|
||||||
self.__post_torrents_message(channel=channel,
|
self.__post_torrents_message(channel=channel,
|
||||||
title=_current_media.title,
|
title=_current_media.title,
|
||||||
|
@ -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._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_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._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:
|
try:
|
||||||
# 总带宽
|
# 总带宽
|
||||||
self._bandwidth = int(float(config.get("bandwidth") or 0)) * 1000000
|
self._bandwidth = int(float(config.get("bandwidth") or 0)) * 1000000
|
||||||
|
Loading…
x
Reference in New Issue
Block a user