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 b8bb6ce..314d532 100644 --- a/app/src/main/java/com/github/catvod/ali/API.java +++ b/app/src/main/java/com/github/catvod/ali/API.java @@ -293,7 +293,7 @@ public class API { JSONObject body = new JSONObject(); body.put("file_id", fileId); body.put("share_id", auth.getShareId()); - body.put("expire_sec", 600); + body.put("expire_sec", 7200); String json = API.get().auth("v2/file/get_share_link_download_url", body, true); String url = new JSONObject(json).optString("download_url"); Map> respHeaders = new HashMap<>(); diff --git a/app/src/main/java/com/github/catvod/spider/Push.java b/app/src/main/java/com/github/catvod/spider/Push.java index d978a4a..f0d60f0 100644 --- a/app/src/main/java/com/github/catvod/spider/Push.java +++ b/app/src/main/java/com/github/catvod/spider/Push.java @@ -14,12 +14,7 @@ public class Push extends Ali { public String detailContent(List ids) throws Exception { String url = ids.get(0).trim(); if (url.contains("aliyundrive")) return super.detailContent(ids); - List playFrom = Arrays.asList("直連", "嗅探", "解析"); - List playUrl = Arrays.asList("播放$" + url, "播放$" + url, "播放$" + url); - Vod vod = create(url); - vod.setVodPlayFrom(TextUtils.join("$$$", playFrom)); - vod.setVodPlayUrl(TextUtils.join("$$$", playUrl)); - return Result.string(vod); + return Result.string(vod(url)); } @Override @@ -30,12 +25,14 @@ public class Push extends Ali { return Result.get().url(id).string(); } - private Vod create(String url) { + private Vod vod(String url) { Vod vod = new Vod(); - vod.setTypeName("FongMi"); vod.setVodId(url); vod.setVodName(url); + vod.setTypeName("FongMi"); vod.setVodPic("https://pic.rmb.bdstatic.com/bjh/1d0b02d0f57f0a42201f92caba5107ed.jpeg"); + vod.setVodPlayFrom(TextUtils.join("$$$", Arrays.asList("直連", "嗅探", "解析"))); + vod.setVodPlayUrl(TextUtils.join("$$$", Arrays.asList("播放$" + url, "播放$" + url, "播放$" + url))); return vod; } } \ No newline at end of file