diff --git a/README.md b/README.md index c72511a6..b3d1b2e3 100644 --- a/README.md +++ b/README.md @@ -144,7 +144,7 @@ docker pull jxxghp/moviepilot:latest `FILTER_RULE` 规则说明: -- 仅支持使用内置规则进行排列组合,内置规则有:`BLU`、`4K`、`1080P`、`CN`、`H265`、`H264`、`DOLBY`、`HDR`、`REMUX`、`FREE` +- 仅支持使用内置规则进行排列组合,内置规则有:`BLU`、`4K`、`1080P`、`CN`、`H265`、`H264`、`DOLBY`、`HDR`、`REMUX`、`WEB-DL`、`FREE` - `&`表示与,`|`表示或,`!`表示非,`>`表示优先级层级 - 符合任一层级规则的资源将被标识选中,匹配成功的层级做为该资源的优先级,排越前面优先级超高 - 不符合过滤规则所有层级规则的资源将不会被选中 diff --git a/app/api/endpoints/system.py b/app/api/endpoints/system.py index 2aab3d24..38ad7ea3 100644 --- a/app/api/endpoints/system.py +++ b/app/api/endpoints/system.py @@ -1,6 +1,7 @@ import json import json import time +from datetime import datetime from typing import Union from fastapi import APIRouter, HTTPException, Depends @@ -93,11 +94,19 @@ def nettest(url: str, """ 测试网络连通性 """ + # 记录开始的毫秒数 + start_time = datetime.now() result = RequestUtils(proxies=settings.PROXY if proxy else None).get_res(url) - + # 计时结束的毫秒数 + end_time = datetime.now() + # 计算相关秒数 if result and result.status_code == 200: - return schemas.Response(success=True) + return schemas.Response(success=True, data={ + "time": round((end_time - start_time).microseconds / 1000) + }) elif result: - return schemas.Response(success=False, message=f"错误码:{result.status_code}") + return schemas.Response(success=False, message=f"错误码:{result.status_code}", data={ + "time": round((end_time - start_time).microseconds / 1000) + }) else: return schemas.Response(success=False, message="网络连接失败!") diff --git a/app/modules/filter/__init__.py b/app/modules/filter/__init__.py index 6739a5ba..7b6a178c 100644 --- a/app/modules/filter/__init__.py +++ b/app/modules/filter/__init__.py @@ -61,6 +61,11 @@ class FilterModule(_ModuleBase): "include": [r'REMUX'], "exclude": [] }, + # WEB-DL + "WEB-DL": { + "include": [r'WEB-?DL|WEB-?RIP'], + "exclude": [] + }, # 免费 "FREE": { "downloadvolumefactor": 0