From 413e1b086d5cd3e0578d8737ad06fdcf42d59744 Mon Sep 17 00:00:00 2001 From: freearhey Date: Fri, 16 Nov 2018 07:40:06 +0300 Subject: [PATCH] Check that variable file is valid url --- test/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/index.js b/test/index.js index 403f10c645..4b0da53b86 100644 --- a/test/index.js +++ b/test/index.js @@ -30,14 +30,14 @@ function _parsePlaylist(parent, playlist) { var file = _getFullPathToFile(parent, item.file) - if(/(\.m3u|\.m3u8)/i.test(file)) { + if(/^(http)/i.test(file) && /(\.m3u|\.m3u8)/i.test(file)) { try { var response = await instance.get(file) console.log(file) console.log(response.status) - // INFO: temporary disabled + // DEBUG: return errors if link is working // var sublist = M3U.parse(response.data); // _parsePlaylist(file, sublist)