From 50f864c13f0b06b34153d90bdba3a74aa23175de Mon Sep 17 00:00:00 2001 From: killer069 <65385476+killer069@users.noreply.github.com> Date: Tue, 24 Aug 2021 20:14:51 +0530 Subject: [PATCH] More Playlist Error fix --- package-lock.json | 2 +- package.json | 2 +- play-dl/YouTube/utils/extractor.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index d14a5ae..307156c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "play-dl", - "version": "0.5.2", + "version": "0.5.3", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/package.json b/package.json index c919391..1401277 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "play-dl", - "version": "0.5.2", + "version": "0.5.3", "description": "YouTube, SoundCloud, Spotify streaming for discord.js bots", "main": "dist/index.js", "typings": "dist/index.d.ts", diff --git a/play-dl/YouTube/utils/extractor.ts b/play-dl/YouTube/utils/extractor.ts index 37540b7..755b347 100644 --- a/play-dl/YouTube/utils/extractor.ts +++ b/play-dl/YouTube/utils/extractor.ts @@ -112,7 +112,7 @@ export async function playlist_info(url : string) { if(url.search('(\\?|\\&)list\\=') === -1) throw new Error('This is not a PlayList URL') let Playlist_id = url.split('list=')[1].split('&')[0] - if(Playlist_id.length !== 34) throw new Error('This is not a PlayList URL') + if(Playlist_id.length !== 34 || Playlist_id.startsWith('PL')) throw new Error('This is not a PlayList URL') let new_url = `https://www.youtube.com/playlist?list=${Playlist_id}` let body = await url_get(new_url)