Skip to content

Commit

Permalink
Fix youtube bridge query issue using url instead of creating actual s…
Browse files Browse the repository at this point in the history
…earch query (#1929)
  • Loading branch information
mariusbegby authored Aug 2, 2024
1 parent 305e66b commit 8d73011
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/extractor/src/extractors/YoutubeExtractor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -268,12 +268,13 @@ export class YoutubeExtractor extends BaseExtractor<YoutubeExtractorInit> {
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]);
}

Expand Down

0 comments on commit 8d73011

Please sign in to comment.