PlayList ID fixed

This commit is contained in:
killer069 2021-10-11 11:51:47 +05:30
parent 10d21bdb88
commit 511c919366

View File

@ -42,10 +42,7 @@ export function yt_validate(url: string): 'playlist' | 'video' | 'search' | fals
} }
} else { } else {
if (!url.match(playlist_pattern)) return false; if (!url.match(playlist_pattern)) return false;
const Playlist_id = url.split('list=')[1].split('&')[0]; else return 'playlist';
if (Playlist_id.length !== 34 || !Playlist_id.startsWith('PL')) {
return false;
} else return 'playlist';
} }
} }
/** /**