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..1b39f9a2 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/pp4iJlq.png" : getThumb(); } public String getRemark() { diff --git a/jar/custom_spider.jar b/jar/custom_spider.jar index 536db3a8..80715666 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..f0cc59ac 100644 --- a/jar/custom_spider.jar.md5 +++ b/jar/custom_spider.jar.md5 @@ -1 +1 @@ -a3a0d399cc8e9e4348060296e4cfab58 +d78cd045dd5861fc7ae08ede3fe76a62