Try to fix ali delete

pull/69/head
FongMi 3 years ago
parent 730b297bb4
commit eed35d181b
  1. 17
      app/src/main/java/com/github/catvod/ali/API.java
  2. 2
      app/src/main/java/com/github/catvod/bean/alist/Item.java
  3. BIN
      jar/custom_spider.jar
  4. 2
      jar/custom_spider.jar.md5

@ -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();
}

@ -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() {

Binary file not shown.

@ -1 +1 @@
a3a0d399cc8e9e4348060296e4cfab58
d78cd045dd5861fc7ae08ede3fe76a62

Loading…
Cancel
Save