MOD:优化乱码查询

This commit is contained in:
leosam1024
2023-07-15 18:50:28 +08:00
parent 82df0d274c
commit 793ce9a20d
3 changed files with 32 additions and 6 deletions
+26
View File
@@ -99,6 +99,7 @@ maxCount:最大返回值,返回结果里面 list 最大数量。 最大值10
# TvBox配置
~~~ json
// 示例
{
"sites": [
{
@@ -119,6 +120,31 @@ maxCount:最大返回值,返回结果里面 list 最大数量。 最大值10
"filterable": 1
}
]
}
// 已有接口-任选其一即可
{
"sites": [
{
"key": "MV_vod",
"name": "🎸┃明星-接口1┃MV",
"type": 1,
"api": "https://tvbox-mv--leosam2048.repl.co/mv/vod",
"searchable": 1,
"quickSearch": 1,
"filterable": 1
}, {
"key": "MV_vod",
"name": "🎸┃明星-接口2┃MV",
"type": 1,
"api": "https://mv.饭太硬.ml/mv/vod",
"searchable": 1,
"quickSearch": 1,
"filterable": 1
}
]
}
~~~
+2 -1
View File
@@ -1,5 +1,6 @@
docker build -t tvbox-mv:latest .
# docker login
# docker tag f19ca91a5d8a leosam1024/tvbox-mv:latest
# docker images
# docker tag d4c90f23cb5f leosam1024/tvbox-mv:latest
# docker push leosam1024/tvbox-mv:latest
@@ -46,11 +46,6 @@ public class StringUtils {
}
public static String cleanString(String s) {
s = s.replace('', '(')
.replace('', ')')
.replace('/', '_')
.replace(']', '_')
;
// 去除乱码 以ISO8859-1方式读取UTF-8编码的中文
if (s.contains("ç") ||
s.contains("å") ||
@@ -65,6 +60,10 @@ public class StringUtils {
s.contains("ï")) {
s = new String(s.getBytes(StandardCharsets.ISO_8859_1), StandardCharsets.UTF_8);
}
s = s.replace('/', ' ')
.replace('[', ' ')
.replace(']', ' ')
.trim();
return s;
}