From f5a48bc433423ccf5f25a071af34dd51e9f5a7f6 Mon Sep 17 00:00:00 2001 From: Snowflake107 Date: Sun, 9 May 2021 18:31:18 +0545 Subject: [PATCH] soundcloud link --- src/utils/Util.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/utils/Util.ts b/src/utils/Util.ts index 7826f5d..86d28c6 100644 --- a/src/utils/Util.ts +++ b/src/utils/Util.ts @@ -65,6 +65,8 @@ export class Util { * @returns {QueryType} */ static getQueryType(query: string): QueryType { + // @todo: better validation + if (query.match(/soundcloud.app.goo.gl/)) return 'soundcloud_track'; if (SoundcloudValidateURL(query) && !query.includes('/sets/')) return 'soundcloud_track'; if (SoundcloudValidateURL(query) && query.includes('/sets/')) return 'soundcloud_playlist'; if (spotifySongRegex.test(query)) return 'spotify_song';