soundcloud link

This commit is contained in:
Snowflake107 2021-05-09 18:31:18 +05:45
parent 5b8b6e0c0d
commit f5a48bc433

View file

@ -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';