From dd813d7c949f4e41365307adbadeab2e1e548e8c Mon Sep 17 00:00:00 2001 From: src48597962 <48597962@qq.com> Date: Sat, 27 Jan 2024 22:08:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20'SrcJyAliPublic.js'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SrcJyAliPublic.js | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/SrcJyAliPublic.js b/SrcJyAliPublic.js index e4029b8..4a644da 100644 --- a/SrcJyAliPublic.js +++ b/SrcJyAliPublic.js @@ -228,19 +228,21 @@ function aliMyPlayUrl(file_id, drive_id) { } else { log('未获取阿里转码播放地址,建议重进软件再试一次') } - let file_url = aliOpenPlayUrl(file_id, undefined, drive_id); - if (file_url) { - if(getItem('yundisk_updateRecord')=="1"){ - let opentoken = getOpenToken(authorization); - headers['authorization'] = 'Bearer ' + opentoken; - fetch('https://openapi.aliyundrive.com/adrive/v1.0/openFile/video/updateRecord',{headers: headers, body: {"duration":"0","drive_id":drive_id,"file_id":file_id,"play_cursor":"0"}, method: 'POST'}); + if (getItem('aliyun_playMode', '智能') == "智能" || getItem('aliyun_playMode') == "原画") { + let file_url = aliOpenPlayUrl(file_id, undefined, drive_id); + if (file_url) { + if(getItem('yundisk_updateRecord')=="1"){ + let opentoken = getOpenToken(authorization); + headers['authorization'] = 'Bearer ' + opentoken; + fetch('https://openapi.aliyundrive.com/adrive/v1.0/openFile/video/updateRecord',{headers: headers, body: {"duration":"0","drive_id":drive_id,"file_id":file_id,"play_cursor":"0"}, method: 'POST'}); + } + + urls.unshift(file_url + "#isVideo=true##pre#"); + names.unshift("原始 画质"); + heads.unshift({ 'Referer': 'https://www.aliyundrive.com/' }); + } else { + clearMyVar('opentokenChecktime'); } - - urls.unshift(file_url + "#isVideo=true##pre#"); - names.unshift("原始 画质"); - heads.unshift({ 'Referer': 'https://www.aliyundrive.com/' }); - } else { - clearMyVar('opentokenChecktime'); } return { urls: urls,