mirror of
https://github.com/iptv-org/iptv
synced 2025-12-16 10:26:48 -05:00
Check that variable file is valid url
This commit is contained in:
@@ -30,14 +30,14 @@ function _parsePlaylist(parent, playlist) {
|
|||||||
|
|
||||||
var file = _getFullPathToFile(parent, item.file)
|
var file = _getFullPathToFile(parent, item.file)
|
||||||
|
|
||||||
if(/(\.m3u|\.m3u8)/i.test(file)) {
|
if(/^(http)/i.test(file) && /(\.m3u|\.m3u8)/i.test(file)) {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
var response = await instance.get(file)
|
var response = await instance.get(file)
|
||||||
console.log(file)
|
console.log(file)
|
||||||
console.log(response.status)
|
console.log(response.status)
|
||||||
|
|
||||||
// INFO: temporary disabled
|
// DEBUG: return errors if link is working
|
||||||
// var sublist = M3U.parse(response.data);
|
// var sublist = M3U.parse(response.data);
|
||||||
// _parsePlaylist(file, sublist)
|
// _parsePlaylist(file, sublist)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user