|
|
|
@ -268,7 +268,6 @@ function aliOpenPlayUrl(file_id, sharedata) { |
|
|
|
|
} catch (e) { |
|
|
|
|
json2 = JSON.parse(request('https://api.xhofe.top/alist/ali_open/code', { body: data2, method: 'POST', timeout: 8000 })); |
|
|
|
|
} |
|
|
|
|
log(json2); |
|
|
|
|
return json2.access_token || ""; |
|
|
|
|
} |
|
|
|
|
function fcopy(obj) { |
|
|
|
@ -302,7 +301,7 @@ function aliOpenPlayUrl(file_id, sharedata) { |
|
|
|
|
} |
|
|
|
|
return json.file_id; |
|
|
|
|
} catch (e) { |
|
|
|
|
log("#原画##copy转存#>异常>"+e.message); |
|
|
|
|
log("原画copy转存异常>"+e.message); |
|
|
|
|
return ""; |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
@ -335,13 +334,11 @@ function aliOpenPlayUrl(file_id, sharedata) { |
|
|
|
|
let drive_id = getMyVar("selectDisk", "1") == "1" ? userinfo.default_drive_id : userinfo.resource_drive_id || userinfo.default_drive_id; |
|
|
|
|
let newfile_id; |
|
|
|
|
if (sharedata) { |
|
|
|
|
log(sharedata); |
|
|
|
|
sharedata.file_id = file_id; |
|
|
|
|
sharedata.drive_id = drive_id; |
|
|
|
|
sharedata.authorization = authorization; |
|
|
|
|
newfile_id = fcopy(sharedata); |
|
|
|
|
if (!newfile_id) { |
|
|
|
|
log("copy失败"); |
|
|
|
|
return ""; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -351,7 +348,7 @@ function aliOpenPlayUrl(file_id, sharedata) { |
|
|
|
|
let nowtime = Date.now(); |
|
|
|
|
let oldtime = parseInt(getMyVar('opentokenChecktime', '0').replace('time', '')); |
|
|
|
|
let aliopentoken = getMyVar('aliopentoken'); |
|
|
|
|
if (aliopentoken && nowtime < (oldtime + 1 * 60 * 60 * 1000)) { |
|
|
|
|
if (aliopentoken && nowtime < (oldtime + 2 * 60 * 60 * 1000)) { |
|
|
|
|
opentoken = aliopentoken; |
|
|
|
|
} else { |
|
|
|
|
opentoken = getOpenToken(authorization); |
|
|
|
|