更新 'SrcJyAliPublic.js'

main
src48597962 1 year ago
parent d18533d898
commit 8e3319b499
  1. 7
      SrcJyAliPublic.js

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

Loading…
Cancel
Save