mirror of
https://github.com/imputnet/cobalt.git
synced 2025-06-28 09:28:29 +00:00
api/youtube: expect one of itags to be empty
Some checks failed
CodeQL / Analyze (${{ matrix.language }}) (none, javascript-typescript) (push) Has been cancelled
Run service tests / test service functionality (push) Has been cancelled
Run tests / check lockfile correctness (push) Has been cancelled
Run tests / web sanity check (push) Has been cancelled
Run tests / api sanity check (push) Has been cancelled
Run service tests / test service: ${{ matrix.service }} (push) Has been cancelled
Some checks failed
CodeQL / Analyze (${{ matrix.language }}) (none, javascript-typescript) (push) Has been cancelled
Run service tests / test service functionality (push) Has been cancelled
Run tests / check lockfile correctness (push) Has been cancelled
Run tests / web sanity check (push) Has been cancelled
Run tests / api sanity check (push) Has been cancelled
Run service tests / test service: ${{ matrix.service }} (push) Has been cancelled
This commit is contained in:
parent
0ab3fe4d2a
commit
ee3ef60a20
@ -351,7 +351,7 @@ export default async function (o) {
|
|||||||
Number(b.bitrate) - Number(a.bitrate)
|
Number(b.bitrate) - Number(a.bitrate)
|
||||||
).forEach(format => {
|
).forEach(format => {
|
||||||
Object.keys(codecList).forEach(yCodec => {
|
Object.keys(codecList).forEach(yCodec => {
|
||||||
const matchingItag = slot => !itag || itag[slot] === format.itag;
|
const matchingItag = slot => !itag?.[slot] || itag[slot] === format.itag;
|
||||||
const sorted = sorted_formats[yCodec];
|
const sorted = sorted_formats[yCodec];
|
||||||
const goodFormat = checkFormat(format, yCodec);
|
const goodFormat = checkFormat(format, yCodec);
|
||||||
if (!goodFormat) return;
|
if (!goodFormat) return;
|
||||||
@ -453,8 +453,8 @@ export default async function (o) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
itag = {
|
itag = {
|
||||||
video: video.itag,
|
video: video?.itag,
|
||||||
audio: audio.itag
|
audio: audio?.itag
|
||||||
};
|
};
|
||||||
|
|
||||||
const originalRequest = {
|
const originalRequest = {
|
||||||
|
Loading…
Reference in New Issue
Block a user