bebo-dot-dev / m3u-epg-editor

a python m3u / epg optimizer
The Unlicense
125 stars 29 forks source link

Script does not find all channels? #17

Closed xses22 closed 5 years ago

xses22 commented 5 years ago

Hello, first of all great work!

I'm having some issues with the tool. It seems like it does not find all channels in the list.

2018-11-23T18:10:25.488923 saving retrieved m3u file: /srv/ftp/original.m3u8 2018-11-23T18:10:25.490849 parsing m3u into a list of objects 2018-11-23T18:10:25.627204 m3u contains 252 items 2018-11-23T18:10:25.627339 keeping channel groups in this list ['extra +1'] 2018-11-23T18:10:25.627796 filtered m3u contains 0 items

It only finds 252 items, but the list has up to 10000 channels in it. I'm a bit confused and hope you can help me.

Thanks in advance.

bebo-dot-dev commented 5 years ago

I can't see what's inside your m3u file but I can tell you that the script runs a few validation steps as it parses the file to determine what it considers to be valid m3u items.

https://github.com/jjssoftware/m3u-epg-editor/blob/master/m3u-epg-editor.py#L56-L61

An m3u item is considered valid when it contains a non-empty group-title attribute value, a non-empty tvg-name attribute value and optionally a non-empty tvg-id attribute value.

If you take a look at the contents of your m3u file with these conditions in mind it might make more sense. One thing you could try is including the --no_tvg_id / -nt argument in your command line, this will enable the script to consider items with no tvg-id attribute value as valid items.

xses22 commented 5 years ago

--nt seems to fix the problem. Thank you very much :)

bebo-dot-dev commented 5 years ago

Great news @xses22, closing now