mirror of
https://github.com/Jerryplusy/rc-plugin.git
synced 2025-10-14 16:19:18 +00:00
🎈 pref: 修剪冗余逻辑
This commit is contained in:
parent
fdd496cbba
commit
eb3c05df07
@ -287,17 +287,10 @@ export class tools extends plugin {
|
||||
if (urlType === "video") {
|
||||
// logger.info(item.video);
|
||||
// 多位面选择:play_addr、play_addr_265、play_addr_h264
|
||||
let resUrl;
|
||||
// 判断是否使用压缩格式
|
||||
const { play_addr } = item.video;
|
||||
const { play_addr: { uri: videoAddrURI } } = item.video;
|
||||
const resolution = this.douyinCompression === 1 ? "720p" : "1080p";
|
||||
// 使用今日头条 CDN 进一步加快解析速度
|
||||
const videoAddrURI = play_addr.uri;
|
||||
if (this.douyinCompression === 1) {
|
||||
resUrl = DY_TOUTIAO_INFO.replace("1080p", "720p").replace("{}", videoAddrURI);
|
||||
} else {
|
||||
// 原始格式,ps. videoAddrList这里[0]、[1]是 http,[最后一个]是 https
|
||||
resUrl = DY_TOUTIAO_INFO.replace("{}", videoAddrURI);
|
||||
}
|
||||
const resUrl = DY_TOUTIAO_INFO.replace("1080p", resolution).replace("{}", videoAddrURI);
|
||||
|
||||
// ⚠️ 暂时废弃代码
|
||||
/*if (this.douyinCompression === 1) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user