This commit is contained in:
FongMi 2023-12-01 22:55:34 +08:00
parent 53f75b5fcb
commit 9229a4c845
5 changed files with 6 additions and 5 deletions

View File

@ -354,6 +354,7 @@ public class AliYun {
JsonObject param = new JsonObject(); JsonObject param = new JsonObject();
param.addProperty("file_id", tempIds.get(0)); param.addProperty("file_id", tempIds.get(0));
param.addProperty("drive_id", cache.getDrive().getDriveId()); param.addProperty("drive_id", cache.getDrive().getDriveId());
param.addProperty("expire_sec", 900);
String json = oauth("openFile/getDownloadUrl", param.toString(), true); String json = oauth("openFile/getDownloadUrl", param.toString(), true);
String url = Download.objectFrom(json).getUrl(); String url = Download.objectFrom(json).getUrl();
downloadMap.put(fileId, url); downloadMap.put(fileId, url);
@ -375,7 +376,7 @@ public class AliYun {
param.addProperty("file_id", tempIds.get(0)); param.addProperty("file_id", tempIds.get(0));
param.addProperty("drive_id", cache.getDrive().getDriveId()); param.addProperty("drive_id", cache.getDrive().getDriveId());
param.addProperty("category", "live_transcoding"); param.addProperty("category", "live_transcoding");
param.addProperty("url_expire_sec", "14400"); param.addProperty("url_expire_sec", 900);
String json = oauth("openFile/getVideoPreviewPlayInfo", param.toString(), true); String json = oauth("openFile/getVideoPreviewPlayInfo", param.toString(), true);
return Preview.objectFrom(json).getVideoPreviewPlayInfo(); return Preview.objectFrom(json).getVideoPreviewPlayInfo();
} catch (Exception e) { } catch (Exception e) {
@ -462,7 +463,7 @@ public class AliYun {
private static boolean isExpire(String url) { private static boolean isExpire(String url) {
String expires = new UrlQuerySanitizer(url).getValue("x-oss-expires"); String expires = new UrlQuerySanitizer(url).getValue("x-oss-expires");
if (TextUtils.isEmpty(expires)) return false; if (TextUtils.isEmpty(expires)) return false;
return Long.parseLong(expires) - getTimeStamp() <= 60; return Long.parseLong(expires) - getTimeStamp() <= 15;
} }
private static long getTimeStamp() { private static long getTimeStamp() {

Binary file not shown.

View File

@ -1 +1 @@
8b94f251e1af6b67e1ee86cb151cda70 d363d6ddea1cbc73ce7addcae613605e

View File

@ -1,5 +1,5 @@
{ {
"spider": "https://fm.t4tv.hz.cz/jar/custom_spider.jar;md5;8b94f251e1af6b67e1ee86cb151cda70", "spider": "https://fm.t4tv.hz.cz/jar/custom_spider.jar;md5;d363d6ddea1cbc73ce7addcae613605e",
"wallpaper": "https://gao.chuqiuyu.tk", "wallpaper": "https://gao.chuqiuyu.tk",
"sites": [ "sites": [
{ {

View File

@ -1,5 +1,5 @@
{ {
"spider": "https://fm.t4tv.hz.cz/jar/custom_spider.jar;md5;8b94f251e1af6b67e1ee86cb151cda70", "spider": "https://fm.t4tv.hz.cz/jar/custom_spider.jar;md5;d363d6ddea1cbc73ce7addcae613605e",
"wallpaper": "http://饭太硬.top/深色壁纸/api.php", "wallpaper": "http://饭太硬.top/深色壁纸/api.php",
"sites": [ "sites": [
{ {