From 13a2f387a6089cb8ebf1a8ff6c1d48b95e93da53 Mon Sep 17 00:00:00 2001 From: Marius Begby Date: Fri, 2 Aug 2024 17:50:55 +0200 Subject: [PATCH] Fix youtube bridge query issue using url instead of creating actual search query --- packages/extractor/src/extractors/YoutubeExtractor.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/extractor/src/extractors/YoutubeExtractor.ts b/packages/extractor/src/extractors/YoutubeExtractor.ts index 41638602e..5930a317b 100644 --- a/packages/extractor/src/extractors/YoutubeExtractor.ts +++ b/packages/extractor/src/extractors/YoutubeExtractor.ts @@ -268,12 +268,13 @@ export class YoutubeExtractor extends BaseExtractor { return this.stream(track); } - const info = await this.handle(track.url, { - requestedBy: track.requestedBy + const query = sourceExtractor?.createBridgeQuery(track) ?? `${track.author} - ${track.title}`; + const info = await this.handle(query, { + requestedBy: track.requestedBy, + type: QueryType.YOUTUBE }); if (!info.tracks.length) return null; - return this.stream(info.tracks[0]); }