From d3680b6dfacb75d303fac8469ed664b42fa37ddd Mon Sep 17 00:00:00 2001 From: qydysky Date: Sun, 21 May 2023 15:45:45 +0800 Subject: [PATCH] =?utf8?q?Improve=20=E7=9B=B4=E6=92=AD=E6=B5=81=E5=9B=9E?= =?utf8?q?=E6=94=BE=E8=BF=9E=E6=8E=A5=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- F/api.go | 1 - Reply/F.go | 6 +++--- demo/config/config_K_v.json | 4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/F/api.go b/F/api.go index 8171966..c6b5784 100644 --- a/F/api.go +++ b/F/api.go @@ -2345,7 +2345,6 @@ func (c *GetFunc) getOnlineGoldRank() (misskey []string) { }, Proxy: c.Proxy, Timeout: 3 * 1000, - Retry: 2, }); err != nil { apilog.L(`E: `, err) return diff --git a/Reply/F.go b/Reply/F.go index 8cc2b97..1d18d94 100644 --- a/Reply/F.go +++ b/Reply/F.go @@ -1169,7 +1169,7 @@ func init() { if vm, ok := limits[i].(map[string]any); ok { if cidr, ok := vm["cidr"].(string); !ok { continue - } else if max, ok := vm["max"].(float64); !ok || max == 0 { + } else if max, ok := vm["max"].(float64); !ok { continue } else { if _, cidrx, err := net.ParseCIDR(cidr); err != nil { @@ -1266,7 +1266,7 @@ func init() { if !limitCon[i].cidr.Contains(ip) { continue } - if limitCon[i].available <= 0 { + if limitCon[i].available == 0 { isOverflow = true break } @@ -1310,7 +1310,7 @@ func init() { if !limitCon[i].cidr.Contains(ip) { continue } - if limitCon[i].available > 0 { + if limitCon[i].available != 0 { add = append(add, i) } } diff --git a/demo/config/config_K_v.json b/demo/config/config_K_v.json index d2be3ae..9355cdb 100644 --- a/demo/config/config_K_v.json +++ b/demo/config/config_K_v.json @@ -96,11 +96,11 @@ "弹幕回放": true, "直播流回放速率-help": "速率为每秒速率 例最小值(1 MB)", "直播流回放速率": "2 MB", - "直播流回放连接限制-help": "限制回放连接数,0无限制", + "直播流回放连接限制-help": "限制回放连接数,<0无限制,=0禁止,>0最大数量", "直播流回放连接限制": [ { "cidr":"0.0.0.0/0", - "max":0 + "max":-1 } ], "ass-help": "只有保存直播流时才考虑生成ass,ass编码默认GB18030(可选utf-8)", -- 2.39.2