Update subtitle find rule for push
This commit is contained in:
parent
eabf997ab3
commit
5bc2ea0658
|
|
@ -58,19 +58,15 @@ public class Push extends Ali {
|
|||
}
|
||||
|
||||
private void setHttpSub(String url, List<Sub> subs) {
|
||||
try {
|
||||
List<String> vodTypes = Arrays.asList("mp4", "mkv");
|
||||
List<String> subTypes = Arrays.asList("srt", "ass");
|
||||
if (!vodTypes.contains(Utils.getExt(url))) return;
|
||||
for (String ext : subTypes) detectSub(url, ext, subs);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
List<String> vodTypes = Arrays.asList("mp4", "mkv");
|
||||
List<String> subTypes = Arrays.asList("srt", "ass");
|
||||
if (!vodTypes.contains(Utils.getExt(url))) return;
|
||||
for (String ext : subTypes) detectSub(url, ext, subs);
|
||||
}
|
||||
|
||||
private void detectSub(String url, String ext, List<Sub> subs) throws Exception {
|
||||
private void detectSub(String url, String ext, List<Sub> subs) {
|
||||
url = Utils.removeExt(url).concat(".").concat(ext);
|
||||
if (OkHttp.newCall(url).code() != 200) return;
|
||||
if (OkHttp.string(url).length() > 100) return;
|
||||
String name = Uri.parse(url).getLastPathSegment();
|
||||
subs.add(Sub.create().name(name).ext(ext).url(url));
|
||||
}
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -1 +1 @@
|
|||
690e9c8ef197edeca7d3e9372aadec95
|
||||
a6934bc36ece4231bc9d2748f96ceaf9
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"spider": "https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;690e9c8ef197edeca7d3e9372aadec95",
|
||||
"spider": "https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;a6934bc36ece4231bc9d2748f96ceaf9",
|
||||
"wallpaper": "https://gao.chuqiuyu.tk",
|
||||
"sites": [
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"spider": "https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;690e9c8ef197edeca7d3e9372aadec95",
|
||||
"spider": "https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;a6934bc36ece4231bc9d2748f96ceaf9",
|
||||
"wallpaper": "http://饭太硬.top/深色壁纸/api.php",
|
||||
"sites": [
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue