Merge pull request #37 from thsrite/main
This commit is contained in:
commit
08881c40e7
@ -134,10 +134,9 @@ class CloudflareSpeedTest(_PluginBase):
|
||||
hosts = customHosts.get("hosts")
|
||||
if isinstance(hosts, str):
|
||||
hosts = str(hosts).split('\n')
|
||||
|
||||
# 校正优选ip
|
||||
if self._check:
|
||||
self.__check_cf_if(hosts=hosts)
|
||||
self.__check_cf_ip(hosts=hosts)
|
||||
|
||||
# 开始优选
|
||||
if err_flag:
|
||||
@ -205,7 +204,7 @@ class CloudflareSpeedTest(_PluginBase):
|
||||
self.__update_config()
|
||||
self.stop_service()
|
||||
|
||||
def __check_cf_if(self, hosts):
|
||||
def __check_cf_ip(self, hosts):
|
||||
"""
|
||||
校正cf优选ip
|
||||
防止特殊情况下cf优选ip和自定义hosts插件中ip不一致
|
||||
@ -213,6 +212,7 @@ class CloudflareSpeedTest(_PluginBase):
|
||||
# 统计每个IP地址出现的次数
|
||||
ip_count = {}
|
||||
for host in hosts:
|
||||
if host:
|
||||
ip = host.split()[0]
|
||||
if ip in ip_count:
|
||||
ip_count[ip] += 1
|
||||
|
@ -558,7 +558,7 @@ class MediaSyncDel(_PluginBase):
|
||||
for match in matches:
|
||||
mtime = match[0]
|
||||
# 排除已处理的媒体信息
|
||||
if last_time and time < last_time:
|
||||
if last_time and mtime < last_time:
|
||||
continue
|
||||
|
||||
mtype = match[1]
|
||||
|
Loading…
x
Reference in New Issue
Block a user