This commit is contained in:
GH Action - Upstream Sync 2023-04-04 01:23:47 +00:00
commit eac096b930
6 changed files with 14 additions and 11 deletions

View File

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

View File

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

Binary file not shown.

View File

@ -1 +1 @@
a3a0d399cc8e9e4348060296e4cfab58
46f550f87ace39f5b51a4fa8737c7029

View File

@ -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": [
{

View File

@ -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": [
{