Automatically sets YouTube videos to their original audio language
< 脚本YouTube Original Audio Selector的反馈
I found that i had a Dubbed
label under the video title to look for so i added it to the list
// Function to check if video has multiple audio tracks
function hasMultipleAudioTracks() {
let sentences = [
'Dubbed',
'Audio tracks for some languages were automatically generated'
];
let xpathQuery = sentences.map(sentence => `//*[contains(text(),'${sentence}')]`).join(' | ');
const autoGeneratedText = document.evaluate(
xpathQuery,
document,
null,
XPathResult.FIRST_ORDERED_NODE_TYPE,
null
).singleNodeValue;
return !!autoGeneratedText;
}
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址
Sadly the fist step of this script is broken.
hasMultipleAudioTracks
seam to only check for theAudio tracks for some languages were automatically generated
sentence, but this is nowhere to be found.When i force this to return true no mater the result, then everything else does work without an itch. so it's only the very first part that look broken on video with alternative but no "auto-generated" audio