pemre / iptv-cli

iptv-cli is a command line tool to parse, filter iptv lists (m3u/m3u8 files).
GNU General Public License v3.0
10 stars 4 forks source link

Error on getting categories #3

Closed aptonline closed 2 years ago

aptonline commented 3 years ago

Hi, brand new install and attempting to parse a local m3u file is giving me the following error when getting categories:

/usr/local/lib/node_modules/iptv-cli/node_modules/m3u8-file-parser/src/parser/extinf.js:55
        token = str.slice(pos + 1, match.index);
                                         ^

TypeError: Cannot read property 'index' of null
    at Object.extinf [as parser] (/usr/local/lib/node_modules/iptv-cli/node_modules/m3u8-file-parser/src/parser/extinf.js:55:42)
    at M3U8FileParser.invokeParser (/usr/local/lib/node_modules/iptv-cli/node_modules/m3u8-file-parser/src/reader.js:77:46)
    at M3U8FileParser.read (/usr/local/lib/node_modules/iptv-cli/node_modules/m3u8-file-parser/src/reader.js:59:12)
    at getChannelsFromFile (/usr/local/lib/node_modules/iptv-cli/src/lib/helpers.js:14:10)
    at getCategories (/usr/local/lib/node_modules/iptv-cli/src/commands/get-categories.js:7:16)
    at Proxy.cli (/usr/local/lib/node_modules/iptv-cli/src/cli.js:31:7)
    at Object.<anonymous> (/usr/local/lib/node_modules/iptv-cli/index.js:3:25)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)

An idea what's going wrong? Thanks.

pemre commented 2 years ago

2 (which fixes #1) should've fixed your problem, let me know if it didn't. I just published v0.2.1 on npm.