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 5ffcb6b8..27633f1e 100644 --- a/app/src/main/java/com/github/catvod/ali/API.java +++ b/app/src/main/java/com/github/catvod/ali/API.java @@ -342,23 +342,25 @@ public class API { } public String getDownloadUrl(String fileId) { + String tempId = null; try { - String tempId = copy(fileId); + tempId = copy(fileId); JSONObject body = new JSONObject(); body.put("file_id", tempId); body.put("drive_id", auth.getDriveId()); - String url = new JSONObject(oauth("openFile/getDownloadUrl", body.toString(), true)).getString("url"); - Init.execute(() -> delete(tempId)); - return url; + return new JSONObject(oauth("openFile/getDownloadUrl", body.toString(), true)).getString("url"); } catch (Exception e) { e.printStackTrace(); return ""; + } finally { + if (tempId != null) delete(tempId); } } public String getPreviewUrl(String fileId, String flag) { + String tempId = null; try { - String tempId = copy(fileId); + tempId = copy(fileId); JSONObject body = new JSONObject(); body.put("file_id", tempId); body.put("drive_id", auth.getDriveId()); @@ -366,11 +368,12 @@ public class API { body.put("url_expire_sec", "14400"); String json = oauth("openFile/getVideoPreviewPlayInfo", body.toString(), true); JSONArray taskList = new JSONObject(json).getJSONObject("video_preview_play_info").getJSONArray("live_transcoding_task_list"); - Init.execute(() -> delete(tempId)); return getPreviewQuality(taskList, flag); } catch (Exception e) { e.printStackTrace(); return ""; + } finally { + if (tempId != null) delete(tempId); } } @@ -396,7 +399,7 @@ public class API { JSONObject body = new JSONObject(); body.put("file_id", fileId); body.put("drive_id", auth.getDriveId()); - oauth("openFile/delete", body.toString(), false); + oauth("openFile/delete", body.toString(), true); } catch (Exception e) { e.printStackTrace(); } diff --git a/app/src/main/java/com/github/catvod/bean/alist/Item.java b/app/src/main/java/com/github/catvod/bean/alist/Item.java index 65745690..3647dc86 100644 --- a/app/src/main/java/com/github/catvod/bean/alist/Item.java +++ b/app/src/main/java/com/github/catvod/bean/alist/Item.java @@ -113,7 +113,7 @@ public class Item { } public String getPic() { - return getThumb().isEmpty() && isFolder() ? "http://img1.3png.com/281e284a670865a71d91515866552b5f172b.png" : getThumb(); + return getThumb().isEmpty() && isFolder() ? "https://s1.ax1x.com/2023/04/03/pp4F4bT.png" : getThumb(); } public String getRemark() { diff --git a/jar/custom_spider.jar b/jar/custom_spider.jar index 536db3a8..66a280a2 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 a568ca74..3dfe830d 100644 --- a/jar/custom_spider.jar.md5 +++ b/jar/custom_spider.jar.md5 @@ -1 +1 @@ -a3a0d399cc8e9e4348060296e4cfab58 +46f550f87ace39f5b51a4fa8737c7029 diff --git a/json/adult.json b/json/adult.json index 5fbeb7a0..03e3988b 100644 --- a/json/adult.json +++ b/json/adult.json @@ -1,5 +1,5 @@ { - "spider": "https://ghproxy.com/https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;a3a0d399cc8e9e4348060296e4cfab58", + "spider": "https://ghproxy.com/https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;46f550f87ace39f5b51a4fa8737c7029", "wallpaper": "https://gao.chuqiuyu.tk", "sites": [ { diff --git a/json/config.json b/json/config.json index 467c930b..4e8434a8 100644 --- a/json/config.json +++ b/json/config.json @@ -1,5 +1,5 @@ { - "spider": "https://ghproxy.com/https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;a3a0d399cc8e9e4348060296e4cfab58", + "spider": "https://ghproxy.com/https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;46f550f87ace39f5b51a4fa8737c7029", "wallpaper": "http://饭太硬.ga/深色壁纸/api.php", "sites": [ {