This commit is contained in:
GH Action - Upstream Sync 2023-01-09 07:50:18 +00:00
commit 554805e266
7 changed files with 66 additions and 10 deletions

View File

@ -37,4 +37,12 @@ public abstract class Spider {
public String playerContent(String flag, String id, List<String> vipFlags) throws Exception {
return "";
}
public boolean manualVideoCheck() {
return false;
}
public boolean isVideoFormat(String url) {
return false;
}
}

View File

@ -44,6 +44,10 @@ public class Init {
get().handler.post(runnable);
}
public static void run(Runnable runnable, int delay) {
get().handler.postDelayed(runnable, delay);
}
public static void show(String msg) {
get().handler.post(() -> Toast.makeText(context(), msg, Toast.LENGTH_LONG).show());
}

View File

@ -0,0 +1,42 @@
package com.github.catvod.spider;
import android.app.Activity;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.text.TextUtils;
import com.github.catvod.crawler.Spider;
public class Live extends Spider {
private int delay;
@Override
public void init(Context context, String extend) {
super.init(context, extend);
this.delay = delay(extend);
}
@Override
public String homeVideoContent() {
Init.run(this::openLive, delay);
return "";
}
private int delay(String extend) {
try {
return TextUtils.isEmpty(extend) ? 0 : Integer.parseInt(extend);
} catch (Throwable ignored) {
return 0;
}
}
private void openLive() {
try {
Activity activity = Init.getActivity();
activity.startActivity(new Intent().setComponent(new ComponentName(activity, "com.fongmi.android.tv.ui.activity.LiveActivity")));
} catch (Throwable ignored) {
}
}
}

Binary file not shown.

View File

@ -1 +1 @@
279424aa7be0e38dbd884daf8913c1d4
e200bfe02aff07b4b4e789dbdb0d15aa

View File

@ -1,5 +1,5 @@
{
"spider": "https://ghproxy.com/https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;279424aa7be0e38dbd884daf8913c1d4",
"spider": "https://ghproxy.com/https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;e200bfe02aff07b4b4e789dbdb0d15aa",
"wallpaper": "https://gao.chuqiuyu.tk",
"lives": [
{

View File

@ -1,16 +1,9 @@
{
"spider": "https://ghproxy.com/https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;279424aa7be0e38dbd884daf8913c1d4",
"spider": "https://ghproxy.com/https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;e200bfe02aff07b4b4e789dbdb0d15aa",
"wallpaper": "http://www.kf666888.cn/api/tvbox/img",
"lives": [
{
"name": "直播",
"type": 0,
"url": "http://home.jundie.top:81/Cat/tv/live.txt",
"epg": "https://epg.112114.xyz/?ch={name}&date={date}",
"logo": "https://epg.112114.xyz/logo/{name}.png"
},
{
"name": "測試",
"type": 1,
"url": "https://ghproxy.com/https://raw.githubusercontent.com/FongMi/CatVodSpider/main/json/live.json",
"epg": "http://epg.51zmt.top:8000/api/diyp/?ch={epg}&date={date}",
@ -161,6 +154,15 @@
"filterable": 0,
"ext": "http://我不是.肥猫.love:63/token.php"
},
{
"key": "Live",
"name": "直播",
"type": 3,
"api": "csp_Live",
"searchable": 0,
"filterable": 0,
"ext": "2000"
},
{
"key": "push_agent",
"name": "推送",