From d908690a569d4afe3464852b95b1fbdc2fac26e5 Mon Sep 17 00:00:00 2001 From: freearhey Date: Sat, 2 Nov 2019 12:54:11 +0300 Subject: [PATCH] Small fixes --- scripts/helper.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/helper.js b/scripts/helper.js index ecfa0322be..02c5f8cf9f 100644 --- a/scripts/helper.js +++ b/scripts/helper.js @@ -1,6 +1,6 @@ const fs = require("fs") const path = require('path') -const parser = require('iptv-playlist-parser') +const playlistParser = require('iptv-playlist-parser') const axios = require('axios') const zlib = require("zlib") const epgParser = require('epg-parser') @@ -29,8 +29,8 @@ helper.getISO6391Code = function(name) { } helper.parsePlaylist = function(filename) { - const content = readFile(filename) - const result = parser.parse(content) + const content = this.readFile(filename) + const result = playlistParser.parse(content) return new Playlist(result) } @@ -125,13 +125,13 @@ helper.getBasename = function(filename) { } helper.addToCache = function(url) { - let id = getUrlPath(url) + let id = this.getUrlPath(url) cache[id] = true } helper.checkCache = function(url) { - let id = getUrlPath(url) + let id = this.getUrlPath(url) return cache.hasOwnProperty(id) }