Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: seek for a non standard header in EPG xml files #896

Closed
t2pierre opened this issue Sep 23, 2024 · 21 comments
Closed

bug: seek for a non standard header in EPG xml files #896

t2pierre opened this issue Sep 23, 2024 · 21 comments

Comments

@t2pierre
Copy link

error parsing xmltv file when is not in first line (which is not standard now

error : AddOnLog: pvr.iptvsimple: pvr.iptvsimple - LoadEPG - Unable parse EPG XML: Start-end tags mismatch, offset: 0:

@phunkyfish
Copy link
Member

Huh?

If the XML file is not valid there is no way to parse it? This error is from the parser.

Can you provide the XML file? There is most definitely a standard for XML files.

@t2pierre
Copy link
Author

t2pierre commented Sep 24, 2024 via email

@phunkyfish
Copy link
Member

Ok, but those files are broken. I’m sorry but I don’t see this as a bug.

@t2pierre
Copy link
Author

t2pierre commented Sep 24, 2024 via email

@phunkyfish
Copy link
Member

Because they are invalid files. I didn’t see an XML file attached to the issue, so I can’t look at it myself.

@t2pierre
Copy link
Author

t2pierre commented Sep 24, 2024 via email

@phunkyfish
Copy link
Member

You might need to upload the file, it’s might not work via email response.

@t2pierre
Copy link
Author

es.xml.gz

@t2pierre
Copy link
Author

t2pierre commented Sep 24, 2024 via email

@phunkyfish
Copy link
Member

es.xml.gz

This xmltv file is valid and contains the leading <?xml version="1.0" encoding="UTF-8"?> tag. So I don't see what the problem is. Or did you add the tag to the file?

@t2pierre
Copy link
Author

t2pierre commented Sep 25, 2024 via email

@phunkyfish
Copy link
Member

Is the file generated by an addon?

can you send me the file without any modifications?

@t2pierre
Copy link
Author

t2pierre commented Oct 6, 2024

epg-34-7.xml.zip

this file is generated by Xteve (IPTV plugin). working fine in Plex or Emby.

@phunkyfish
Copy link
Member

phunkyfish commented Oct 7, 2024

Thanks for the file, it helped with testing. This had nothing to do with the parser at all. It would in fact accept a file without the leading xml tag.

There was a check for tarred archives prior to parsing that looks for the xml tag. I've now changed this to the xml tag or starting wit < and ending with >.

Please test:

@Uukrull
Copy link

Uukrull commented Oct 8, 2024

After this update I get no epg at all. Before launching Kodi I deleted Epg19.db to be sure to start fresh and these are the logs for 22.2.0 (working) and 22.2.1 (no EPG at all):

kodi_22.2.0.log

kodi_22.2.1.log

This happens with the external epg I used for this test (https://www.tdtchannels.com/epg/TV.xml) and my own customized xml.

From the 22.2.1 log:

2024-10-08 16:03:10.657 T:17704   error <general>: AddOnLog: pvr.iptvsimple: pvr.iptvsimple - iptvsimple::Epg::LoadEPG - Unable parse EPG XML: Start-end tags mismatch, offset: 17: 
                                                   [ 
                                                   	</programme>
                                                   </ 
                                                   ]

@phunkyfish
Copy link
Member

After this update I get no epg at all. Before launching Kodi I deleted Epg19.db to be sure to start fresh and these are the logs for 22.2.0 (working) and 22.2.1 (no EPG at all):

kodi_22.2.0.log

kodi_22.2.1.log

This happens with the external epg I used for this test (https://www.tdtchannels.com/epg/TV.xml) and my own customized xml.

From the 22.2.1 log:

2024-10-08 16:03:10.657 T:17704   error <general>: AddOnLog: pvr.iptvsimple: pvr.iptvsimple - iptvsimple::Epg::LoadEPG - Unable parse EPG XML: Start-end tags mismatch, offset: 17: 
                                                   [ 
                                                   	</programme>
                                                   </ 
                                                   ]

ok, I’ll test using that xml file later on. Do you have some sample M3U entries I can use to test it works correctly? The URLs can be obfuscated, I don’t need anything to play, just load in the UI.

@Uukrull
Copy link

Uukrull commented Oct 8, 2024

This is what I'm using for the test:

#EXTM3U

#EXTINF:-1 tvg-id="24Horas.TV" tvg-logo="https://pbs.twimg.com/profile_images/1144547866393882626/2R0Khn5n_200x200.png" group-title="Informativos" tvg-name="24h",24h
https://ztnr.rtve.es/ztnr/1694255.m3u8

@phunkyfish
Copy link
Member

@Uukrull

Your test M3U and XML file work for me on a mac. The previously supplied XML file from @t2pierre also worked for me.

Let me create you a testbuild with some logging for you to run and post the debug log.

@phunkyfish
Copy link
Member

Oh, I think I found the problem. Can try this testbuild?

https://jenkins.kodi.tv/blue/organizations/jenkins/kodi-pvr%2Fpvr.iptvsimple/detail/PR-904/1/artifacts

@Uukrull
Copy link

Uukrull commented Oct 8, 2024

Working now:

2024-10-08 21:54:11.767 T:12992   debug <general>: CCurlFile::XFILE::CCurlFile::Open - <https://www.tdtchannels.com/epg/TV.xml> Effective URL is https://www.tdtchannels.com/epg/TV.xml.gz
2024-10-08 21:54:11.819 T:12992   debug <general>: AddOnLog: pvr.iptvsimple: pvr.iptvsimple - iptvsimple::Epg::LoadChannelEpgs - Loaded channel EPG with id '24Horas.TV' with display names: '24Horas.TV'
2024-10-08 21:54:11.819 T:12992    info <general>: AddOnLog: pvr.iptvsimple: pvr.iptvsimple - iptvsimple::Epg::LoadChannelEpgs - Loaded '1' EPG channels.
2024-10-08 21:54:11.820 T:12992    info <general>: AddOnLog: pvr.iptvsimple: pvr.iptvsimple - iptvsimple::Epg::LoadEpgEntries - Loaded '37' EPG entries.
2024-10-08 21:54:11.822 T:12992    info <general>: AddOnLog: pvr.iptvsimple: pvr.iptvsimple - iptvsimple::Epg::LoadEPG - EPG Loaded - 302 (ms)

Many thanks.

@phunkyfish
Copy link
Member

Great, I've released that now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants