Skip to content

Commit 03bbaf5

Browse files
committed
fix: 推送UC
推送忘改了
1 parent 345025c commit 03bbaf5

File tree

1 file changed

+3
-20
lines changed

1 file changed

+3
-20
lines changed

Diff for: js/push_agent.js

+3-20
Original file line numberDiff line numberDiff line change
@@ -254,30 +254,13 @@ var rule = {
254254
}
255255
}
256256
if (flag.startsWith('UC-')) {
257-
log("UC网盘解析开始")
257+
console.log("UC网盘解析开始");
258258
if (!UCDownloadingCache[ids[1]]) {
259259
const down = await UC.getDownload(ids[0], ids[1], ids[2], ids[3], true);
260260
if (down) UCDownloadingCache[ids[1]] = down;
261261
}
262-
downUrl = UCDownloadingCache[ids[1]].download_url;
263-
const headers = {
264-
"Referer": "https://drive.uc.cn/",
265-
"cookie": UC.cookie,
266-
"User-Agent": 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) quark-cloud-drive/2.5.20 Chrome/100.0.4896.160 Electron/18.3.5.4-b478491100 Safari/537.36 Channel/pckk_other_ch'
267-
};
268-
urls.push("UC原画", downUrl);
269-
270-
urls.push("原代服", mediaProxyUrl + `?thread=${ENV.get('thread') || 6}&form=urlcode&randUa=1&url=` + encodeURIComponent(downUrl) + '&header=' + encodeURIComponent(JSON.stringify(headers)));
271-
if (ENV.get('play_local_proxy_type', '1') === '2') {
272-
urls.push("原代本", `http://127.0.0.1:7777/?thread=${ENV.get('thread') || 6}&form=urlcode&randUa=1&url=` + encodeURIComponent(downUrl) + '&header=' + encodeURIComponent(JSON.stringify(headers)));
273-
} else {
274-
urls.push("原代本", `http://127.0.0.1:5575/proxy?thread=${ENV.get('thread') || 6}&chunkSize=256&url=` + encodeURIComponent(downUrl));
275-
}
276-
return {
277-
parse: 0,
278-
url: urls,
279-
header: headers,
280-
}
262+
const downCache = UCDownloadingCache[ids[1]];
263+
return await UC.getLazyResult(downCache, mediaProxyUrl)
281264
}
282265
if (flag.startsWith('Ali-')) {
283266
const transcoding_flag = {

0 commit comments

Comments
 (0)