api/youtube: return internal metadata for replaying request

This commit is contained in:
jj 2025-01-20 14:47:09 +00:00
parent 7767a5f5bb
commit 19ade7c905
No known key found for this signature in database

View file

@ -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
} }
} }