mirror of
https://github.com/YuzuZensai/play-dl-test.git
synced 2026-01-31 14:58:05 +00:00
Search function fixed
This commit is contained in:
@@ -77,7 +77,7 @@ export async function search(
|
||||
options: SearchOptions = {}
|
||||
): Promise<YouTube[] | Spotify[] | SoundCloud[]> {
|
||||
if (!options.source) options.source = { youtube: 'video' };
|
||||
|
||||
query = encodeURIComponent(query)
|
||||
if (options.source.youtube) return await yt_search(query, { limit: options.limit, type: options.source.youtube });
|
||||
else if (options.source.spotify) return await sp_search(query, options.source.spotify, options.limit);
|
||||
else if (options.source.soundcloud) return await so_search(query, options.source.soundcloud, options.limit);
|
||||
|
||||
Reference in New Issue
Block a user