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