From 46bbd86fcfdf2ef576c659dd4ba7dd3290704b38 Mon Sep 17 00:00:00 2001 From: renxia Date: Thu, 29 Jun 2023 14:51:02 +0800 Subject: [PATCH] =?UTF-8?q?wip:=20=E6=96=B0=E5=A2=9E=E9=83=A8=E5=88=86?= =?UTF-8?q?=E8=B5=84=E6=BA=90API=E7=AB=99=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lib/video-search.ts | 2 +- test/remote-config-prepare.json | 102 ++++++++++++++++++++++++++++++++ test/remote-config.json | 33 ++++++++--- 3 files changed, 127 insertions(+), 10 deletions(-) create mode 100644 test/remote-config-prepare.json diff --git a/src/lib/video-search.ts b/src/lib/video-search.ts index 56c0d3c..f1955a5 100644 --- a/src/lib/video-search.ts +++ b/src/lib/video-search.ts @@ -33,7 +33,7 @@ export interface VSOptions { export class VideoSearch { public apiMap = new Map(); public get api() { - return [...this.apiMap.values()]; + return [...this.apiMap.values()].reverse(); } constructor(protected options: VSOptions = {}) { if (!options.api?.length) options.api = []; diff --git a/test/remote-config-prepare.json b/test/remote-config-prepare.json new file mode 100644 index 0000000..a0cd4f3 --- /dev/null +++ b/test/remote-config-prepare.json @@ -0,0 +1,102 @@ +{ + "apiSites": [ + { + "desc": "天堂", + "url": "http://vipmv.cc/api.php/provide/vod/", + "home": "http://vipmv.cc" + }, + { + "desc": "快车", + "home": "http://kuaichezy.com", + "url": "https://caiji.kczyapi.com/api.php/provide/vod/" + }, + { + "desc": "天空", + "home": "https://tiankongzy.com", + "url": "https://api.tiankongapi.com/api.php/provide/vod/" + }, + { + "desc": "飞速", + "home": "https://fszy2.com", + "url": "https://www.feisuzyapi.com/api.php/provide/vod/" + }, + { + "desc": "卧龙", + "home": "http://wolongzy.cc", + "url": "https://collect.wolongzy.cc/api.php/provide/vod/" + }, + { + "desc": "无尽", + "home": "https://wujinzy.net", + "url": "https://api.wujinapi.me/api.php/provide/vod/" + }, + { + "desc": "金鹰", + "home": "https://jyzyapi.com", + "url": "https://jyzyapi.com/provide/vod/", + "enable": 1 + }, + { + "desc": "金鹰备用1", + "home": "http://jyzy1.com", + "url": "https://jyzy1.com/provide/vod/", + "enable": 0 + }, + { + "desc": "金鹰备用2", + "home": "http://jinyingzy.com", + "url": "https://jyzyapi.com/provide/vod/", + "enable": 0 + }, + { + "desc": "新浪", + "home": "https://www.xinlangzy.com", + "url": "https://api.xinlangapi.com/xinlangapi.php/provide/vod/" + }, + { + "desc": "光速", + "home": "https://guangsuzy.com", + "url": "https://api.guangsuapi.com/api.php/provide/vod/" + }, + { + "desc": "闪电", + "home": "https://www.shan05.com", + "url": "https://sdzyapi.com/api.php/provide/vod/" + }, + { + "desc": "apibdzy(百度云资源)", + "home": "https://bdyunzy.com", + "url": "https://api.apibdzy.com/api.php/provide/vod/" + }, + { + "desc": "U酷", + "home": "https://ukuzy0.com", + "url": "https://api.ukuapi.com/api.php/provide/vod/" + }, + { + "desc": "CK资源", + "home": "https://www.ckzy1.com/", + "url": "https://ckzy.me/api.php/provide/vod/" + }, + { + "desc": "量子", + "home": "http://lzizy.net", + "url": "https://cj.lziapi.com/api.php/provide/vod/" + }, + { + "desc": "速播", + "home": "https://www.subozy1.com", + "url": "https://subocaiji.com/api.php/provide/vod/" + }, + { + "desc": "红牛", + "home": "https://hongniuzy.net/help/", + "url": "https://www.hongniuzy2.com/api.php/provide/vod/" + }, + { + "desc": "6U", + "url": "http://www.6uapi.cc/api.php/provide/vod/", + "home": "http://www.6uzy.cc" + } + ] +} diff --git a/test/remote-config.json b/test/remote-config.json index 0bd97e1..f0cbbf5 100644 --- a/test/remote-config.json +++ b/test/remote-config.json @@ -1,19 +1,34 @@ { "apiSites": [ { - "url": "https://jyzyapi.com/provide/vod/", - "desc": "金鹰", - "enable": 1 + "desc": "天堂", + "url": "http://vipmv.cc/api.php/provide/vod/", + "home": "http://vipmv.cc" }, { - "url": "https://jyzy1.com/provide/vod/", - "desc": "金鹰备用1", - "enable": 0 + "desc": "快车", + "home": "http://kuaichezy.com", + "url": "https://caiji.kczyapi.com/api.php/provide/vod/" }, { - "url": "https://api.xinlangapi.com/xinlangapi.php/provide/vod/", - "desc": "新浪API", - "enable": 1 + "desc": "天空", + "home": "https://tiankongzy.com", + "url": "https://api.tiankongapi.com/api.php/provide/vod/" + }, + { + "desc": "飞速", + "home": "https://fszy2.com", + "url": "https://www.feisuzyapi.com/api.php/provide/vod/" + }, + { + "desc": "卧龙", + "home": "http://wolongzy.cc", + "url": "https://collect.wolongzy.cc/api.php/provide/vod/" + }, + { + "desc": "无尽", + "home": "https://wujinzy.net", + "url": "https://api.wujinapi.me/api.php/provide/vod/" } ] }