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

View File

@@ -61,7 +61,7 @@ export function yt_validate(url: string): 'playlist' | 'video' | 'search' | fals
else return 'search';
}
} 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';
}
}