diff --git a/play-dl/YouTube/utils/extractor.ts b/play-dl/YouTube/utils/extractor.ts index 3648b31..a4e8f27 100644 --- a/play-dl/YouTube/utils/extractor.ts +++ b/play-dl/YouTube/utils/extractor.ts @@ -211,7 +211,8 @@ export async function video_basic_info(url: string, options: InfoOptions = {}): music.push({}); music[music.length - 1].song = x.metadataRowRenderer.contents[0].simpleText ?? x.metadataRowRenderer.contents[0]?.runs?.[0]?.text; - } else + } else if (music.length === 0) return; + else music[music.length - 1][x.metadataRowRenderer.title.simpleText.toLowerCase()] = x.metadataRowRenderer.contents[0].simpleText ?? x.metadataRowRenderer.contents[0]?.runs?.[0]?.text; });