|
@@ -340,13 +340,13 @@ detail = async (url, platform) => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- let formatIds = [];
|
|
|
const formats = [];
|
|
|
+ const qualities = [];
|
|
|
for (let format of originFormats) {
|
|
|
if (printable(platform)) {
|
|
|
console.log(format);
|
|
|
}
|
|
|
- if (format && formatIds.indexOf(format['itag']) === -1) {
|
|
|
+ if (format && qualities.indexOf(format['qualityLabel']) === -1) {
|
|
|
if (!format["url"]) {
|
|
|
format["url"] = await signUrl(format["signatureCipher"], baseJsUrl, platform);
|
|
|
}
|
|
@@ -375,7 +375,7 @@ detail = async (url, platform) => {
|
|
|
current["source"] = format
|
|
|
}
|
|
|
formats.push(current)
|
|
|
- formatIds.push(format["itag"]);
|
|
|
+ qualities.push(format["qualityLabel"]);
|
|
|
} else if (vcodec && !acodec) {
|
|
|
const current = {
|
|
|
"width": format["width"] + "",
|
|
@@ -399,7 +399,7 @@ detail = async (url, platform) => {
|
|
|
current["source"] = format
|
|
|
}
|
|
|
formats.push(current)
|
|
|
- formatIds.push(format["itag"]);
|
|
|
+ qualities.push(format["qualityLabel"]);
|
|
|
}
|
|
|
}
|
|
|
}
|