validate url
This commit is contained in:
parent
7a8ed2414e
commit
59fdcbf032
1 changed files with 2 additions and 2 deletions
|
@ -65,8 +65,8 @@ export class Util {
|
|||
* @returns {QueryType}
|
||||
*/
|
||||
static getQueryType(query: string): QueryType {
|
||||
if (SoundcloudValidateURL(query) && !query.includes('/sets/')) return 'soundcloud_track';
|
||||
if (SoundcloudValidateURL(query) && query.includes('/sets/')) return 'soundcloud_playlist';
|
||||
if (SoundcloudValidateURL(query, 'track')) return 'soundcloud_track';
|
||||
if (SoundcloudValidateURL(query, 'playlist') || query.includes('/sets/')) return 'soundcloud_playlist';
|
||||
if (spotifySongRegex.test(query)) return 'spotify_song';
|
||||
if (spotifyAlbumRegex.test(query)) return 'spotify_album';
|
||||
if (spotifyPlaylistRegex.test(query)) return 'spotify_playlist';
|
||||
|
|
Loading…
Reference in a new issue