diff --git a/app/src/main/java/com/github/catvod/ali/API.java b/app/src/main/java/com/github/catvod/ali/API.java index f46d3ae2..1104d8a5 100644 --- a/app/src/main/java/com/github/catvod/ali/API.java +++ b/app/src/main/java/com/github/catvod/ali/API.java @@ -20,7 +20,6 @@ import com.github.catvod.bean.ali.Code; import com.github.catvod.bean.ali.Data; import com.github.catvod.bean.ali.Item; import com.github.catvod.bean.ali.OAuth; -import com.github.catvod.bean.ali.Sorter; import com.github.catvod.bean.ali.User; import com.github.catvod.crawler.SpiderDebug; import com.github.catvod.net.OkHttp; @@ -120,6 +119,7 @@ public class API { HashMap headers = getHeader(); headers.put("authorization", user.getAuthorization()); headers.put("x-share-token", shareToken); + headers.put("X-Canary", "client=Android,app=adrive,version=v4.3.1"); return headers; } @@ -267,7 +267,6 @@ public class API { List playFrom = Arrays.asList("原畫", "超清", "高清"); List episode = new ArrayList<>(); List playUrl = new ArrayList<>(); - Sorter.sort(files); for (Item file : files) episode.add(file.getDisplayName() + "$" + file.getFileId() + findSubs(file.getName(), subMap)); for (int i = 0; i < playFrom.size(); i++) playUrl.add(TextUtils.join("#", episode)); Vod vod = new Vod(); diff --git a/app/src/main/java/com/github/catvod/bean/ali/Sorter.java b/app/src/main/java/com/github/catvod/bean/ali/Sorter.java deleted file mode 100644 index ee200131..00000000 --- a/app/src/main/java/com/github/catvod/bean/ali/Sorter.java +++ /dev/null @@ -1,27 +0,0 @@ -package com.github.catvod.bean.ali; - -import com.github.catvod.utils.Utils; - -import java.util.Collections; -import java.util.Comparator; -import java.util.List; - -public class Sorter implements Comparator { - - public static void sort(List items) { - Collections.sort(items, new Sorter()); - } - - @Override - public int compare(Item o1, Item o2) { - try { - return Integer.compare(getDigit(o1.getDisplayName()), getDigit(o2.getDisplayName())); - } catch (NumberFormatException e) { - return o1.getDisplayName().compareToIgnoreCase(o2.getDisplayName()); - } - } - - private int getDigit(String text) throws NumberFormatException { - return Integer.parseInt(Utils.removeExt(text).replace("1080P", "").replace("4K", "").replaceAll("\\D+", "")); - } -} diff --git a/jar/custom_spider.jar b/jar/custom_spider.jar index af87ebdc..223cd0cb 100644 Binary files a/jar/custom_spider.jar and b/jar/custom_spider.jar differ diff --git a/jar/custom_spider.jar.md5 b/jar/custom_spider.jar.md5 index e9ca8e64..d8f9172a 100644 --- a/jar/custom_spider.jar.md5 +++ b/jar/custom_spider.jar.md5 @@ -1 +1 @@ -836941085af643869ef5e0d9dce6d301 +ecddb20dad437ff099b1e777bc5545ab diff --git a/json/adult.json b/json/adult.json index 4c6a87ae..ffa575c1 100644 --- a/json/adult.json +++ b/json/adult.json @@ -1,5 +1,5 @@ { - "spider": "https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;836941085af643869ef5e0d9dce6d301", + "spider": "https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;ecddb20dad437ff099b1e777bc5545ab", "wallpaper": "https://gao.chuqiuyu.tk", "sites": [ { diff --git a/json/config.json b/json/config.json index 2bdc6216..96f62ff0 100644 --- a/json/config.json +++ b/json/config.json @@ -1,5 +1,5 @@ { - "spider": "https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;836941085af643869ef5e0d9dce6d301", + "spider": "https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;ecddb20dad437ff099b1e777bc5545ab", "wallpaper": "http://饭太硬.ga/深色壁纸/api.php", "sites": [ {