1.设置豆瓣为默认线路

2.dplayer 引入修改
This commit is contained in:
make
2025-09-05 19:07:08 +08:00
parent 9c4c07a46a
commit e04b380b94
9 changed files with 36 additions and 27 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -572,12 +572,20 @@ function initDPlayer(strPlayUrl) {
});
}
// function findFirstUrl(obj) {
// for (const key in obj) {
// const data = obj[key];
// if (Array.isArray(data) && data.length > 0 && data[0].url) {
// return data['douban'].url;
// return data[0].url;
// }
// }
// return null;
// }
function findFirstUrl(obj) {
for (const key in obj) {
const data = obj[key];
if (Array.isArray(data) && data.length > 0 && data[0].url) {
return data[0].url;
}
const data = obj?.douban;
if (Array.isArray(data) && data.length > 0 && data[0].url) {
return data[0].url;
}
return null;
}
@@ -628,6 +636,7 @@ document.addEventListener("DOMContentLoaded", function () {
if (typeof strPlayType !== "undefined"){
if (strPlayType == 'default') {
console.log(arrPlayUrl)
strPlayUrl = findFirstUrl(arrPlayUrl)
// checkLine(strPlayType);
} else {