mirror of
https://github.com/imputnet/cobalt.git
synced 2025-01-22 14:31:41 +00:00
api/youtube: return internal metadata for replaying request
This commit is contained in:
parent
7767a5f5bb
commit
19ade7c905
|
@ -452,6 +452,18 @@ export default async function (o) {
|
||||||
youtubeDubName: dubbedLanguage || false,
|
youtubeDubName: dubbedLanguage || false,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
itag = {
|
||||||
|
video: video.itag,
|
||||||
|
audio: audio.itag
|
||||||
|
};
|
||||||
|
|
||||||
|
const originalRequest = {
|
||||||
|
...o,
|
||||||
|
dispatcher: undefined,
|
||||||
|
itag,
|
||||||
|
innertubeClient
|
||||||
|
};
|
||||||
|
|
||||||
if (audio && o.isAudioOnly) {
|
if (audio && o.isAudioOnly) {
|
||||||
let bestAudio = codec === "h264" ? "m4a" : "opus";
|
let bestAudio = codec === "h264" ? "m4a" : "opus";
|
||||||
let urls = audio.url;
|
let urls = audio.url;
|
||||||
|
@ -473,6 +485,7 @@ export default async function (o) {
|
||||||
fileMetadata,
|
fileMetadata,
|
||||||
bestAudio,
|
bestAudio,
|
||||||
isHLS: useHLS,
|
isHLS: useHLS,
|
||||||
|
originalRequest
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -516,6 +529,7 @@ export default async function (o) {
|
||||||
filenameAttributes,
|
filenameAttributes,
|
||||||
fileMetadata,
|
fileMetadata,
|
||||||
isHLS: useHLS,
|
isHLS: useHLS,
|
||||||
|
originalRequest
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue