Remove ali sort
This commit is contained in:
parent
c56a6c1282
commit
af4a6ca82c
|
|
@ -20,7 +20,6 @@ import com.github.catvod.bean.ali.Code;
|
||||||
import com.github.catvod.bean.ali.Data;
|
import com.github.catvod.bean.ali.Data;
|
||||||
import com.github.catvod.bean.ali.Item;
|
import com.github.catvod.bean.ali.Item;
|
||||||
import com.github.catvod.bean.ali.OAuth;
|
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.bean.ali.User;
|
||||||
import com.github.catvod.crawler.SpiderDebug;
|
import com.github.catvod.crawler.SpiderDebug;
|
||||||
import com.github.catvod.net.OkHttp;
|
import com.github.catvod.net.OkHttp;
|
||||||
|
|
@ -267,7 +266,6 @@ public class API {
|
||||||
List<String> playFrom = Arrays.asList("原畫", "超清", "高清");
|
List<String> playFrom = Arrays.asList("原畫", "超清", "高清");
|
||||||
List<String> episode = new ArrayList<>();
|
List<String> episode = new ArrayList<>();
|
||||||
List<String> playUrl = new ArrayList<>();
|
List<String> playUrl = new ArrayList<>();
|
||||||
Sorter.sort(files);
|
|
||||||
for (Item file : files) episode.add(file.getDisplayName() + "$" + file.getFileId() + findSubs(file.getName(), subMap));
|
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));
|
for (int i = 0; i < playFrom.size(); i++) playUrl.add(TextUtils.join("#", episode));
|
||||||
Vod vod = new Vod();
|
Vod vod = new Vod();
|
||||||
|
|
|
||||||
|
|
@ -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<Item> {
|
|
||||||
|
|
||||||
public static void sort(List<Item> 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+", ""));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Binary file not shown.
|
|
@ -1 +1 @@
|
||||||
836941085af643869ef5e0d9dce6d301
|
bbd25da05e43977b11c52ccf06c0c1ed
|
||||||
|
|
|
||||||
|
|
@ -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;bbd25da05e43977b11c52ccf06c0c1ed",
|
||||||
"wallpaper": "https://gao.chuqiuyu.tk",
|
"wallpaper": "https://gao.chuqiuyu.tk",
|
||||||
"sites": [
|
"sites": [
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -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;bbd25da05e43977b11c52ccf06c0c1ed",
|
||||||
"wallpaper": "http://饭太硬.ga/深色壁纸/api.php",
|
"wallpaper": "http://饭太硬.ga/深色壁纸/api.php",
|
||||||
"sites": [
|
"sites": [
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue