Skip to content

Commit

Permalink
Fix: Soundcloud bridge
Browse files Browse the repository at this point in the history
  • Loading branch information
retrouser955 committed Aug 2, 2024
1 parent d436729 commit 305e66b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/extractor/src/extractors/SoundCloudExtractor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ export class SoundCloudExtractor extends BaseExtractor<SoundCloudExtractorInit>
}

public async stream(info: Track) {

const url = await this.internal.util.streamLink(info.url).catch(Util.noop);
if (!url) throw new Error('Could not extract stream from this track source');

Expand All @@ -229,8 +230,11 @@ export class SoundCloudExtractor extends BaseExtractor<SoundCloudExtractorInit>
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.SOUNDCLOUD_SEARCH
});

if (!info.tracks.length) return null;
Expand Down

0 comments on commit 305e66b

Please sign in to comment.