Merge pull request #305 from Alex-CD/main

Fix for exceeded call stack for yt_validate by @Alex-CD
This commit is contained in:
AtariTom 2022-06-15 16:41:09 -04:00 committed by GitHub
commit ce9c574607
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -61,7 +61,7 @@ export function yt_validate(url: string): 'playlist' | 'video' | 'search' | fals
else return 'search'; else return 'search';
} }
} else { } else {
if (!url_.match(playlist_pattern)) return yt_validate(url_.replace(/(\?|\&)list=[^&]+/, '')); if (!url_.match(playlist_pattern)) return yt_validate(url_.replace(/(\?|\&)list=[^&]*/, ''));
else return 'playlist'; else return 'playlist';
} }
} }