Closed Olivier6767 closed 2 years ago
Thanks for that, I suppose it could be argued that https://github.com/bebo-dot-dev/m3u-epg-editor/blob/master/m3u-epg-editor-py3.py#L724 is buggy in so far as it is currently lossy, it removes data from the newly rewritten m3u file that was present in the original m3u file when it shouldn't do that.
I think you could have achieved the same result as your fix by making line #724 look like this:
if entry.tvg_id is not None:
It looks like the the same could be said for a few of the other attributes in the same area, namely group-title, timeshift, catchup-days, catchup and catchup-source.
In a general sense I suspect that most people don't notice if a few empty string attributes go missing from the newly rewritten m3u file but in your case this behaviour seems to be causing an issue due to the double pass filtering arrangement in your setup.
Thanks. I adjusted the fix based on your recommendation.
After reflection I decided that this issue was a bug and applied https://github.com/bebo-dot-dev/m3u-epg-editor/commit/579c8909e026441fb346b463f99774d068c25530 as the fix.
Thank you for creating this issue.
Hello, I have an input M3U file that has some channels with a blank
tvg-id
tag (tvg-id=""). When running m3u-epg-editor to filter out some channels (based on groups), the generated M3U file has notvg-id
tag at all for the ones where it was empty.My settings for tvg-id and epg are:
When I then use the generated M3U file again to run a second pass of channel filtering (based on channel names), the process crashes here:
After looking at the code, I think the following section is the reason for the issue (line 724):
I have been able to fix it by adding these 2 lines to this block of code:
This forces the
tvg-id
tag to be present in the M3U file, even if thetvg-id
value is blank.This may not be the most elegant fix..., but it may be useful for other users.