Update jar

This commit is contained in:
FongMi 2023-06-14 17:15:09 +08:00
parent ba4c0564d0
commit f068e23967
5 changed files with 14 additions and 8 deletions

View File

@ -59,17 +59,23 @@ public class Push extends Ali {
private void setHttpSub(String url, List<Sub> subs) {
try {
String ext = url.substring(url.lastIndexOf(".") + 1);
String ext = Utils.getExt(url);
if (!ext.equals("mp4") && !ext.equals("mkv")) return;
String srt = Utils.removeExt(url).concat(".srt");
String ass = Utils.removeExt(url).concat(".ass");
if (OkHttp.newCall(srt).code() == 200) subs.add(Sub.create().name(Uri.parse(srt).getLastPathSegment()).ext("srt").url(srt));
if (OkHttp.newCall(ass).code() == 200) subs.add(Sub.create().name(Uri.parse(ass).getLastPathSegment()).ext("ass").url(ass));
List<String> types = Arrays.asList(".srt", ".ass");
for (String type : types) detectSub(Utils.removeExt(url).concat(type), subs);
} catch (Exception e) {
e.printStackTrace();
}
}
private void detectSub(String url, List<Sub> subs) throws Exception {
if (OkHttp.newCall(url).code() == 200) {
String ext = Utils.getExt(url);
String name = Uri.parse(url).getLastPathSegment();
subs.add(Sub.create().name(name).ext(ext).url(url));
}
}
private void setFileSub(String url, List<Sub> subs) {
File file = new File(url.replace("file://", ""));
if (file.getParentFile() == null) return;

Binary file not shown.

View File

@ -1 +1 @@
1117ef714ea9053d670c6748723500f8
d0ac4c362ded4782f74f467bfa3420be

View File

@ -1,5 +1,5 @@
{
"spider": "https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;1117ef714ea9053d670c6748723500f8",
"spider": "https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;d0ac4c362ded4782f74f467bfa3420be",
"wallpaper": "https://gao.chuqiuyu.tk",
"sites": [
{

View File

@ -1,5 +1,5 @@
{
"spider": "https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;1117ef714ea9053d670c6748723500f8",
"spider": "https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;d0ac4c362ded4782f74f467bfa3420be",
"wallpaper": "http://饭太硬.top/深色壁纸/api.php",
"sites": [
{