Skip to content

Commit

Permalink
Merge pull request #905 from phunkyfish/fix-xmltv-format-check-omega
Browse files Browse the repository at this point in the history
Fix xmltv format check omega
  • Loading branch information
phunkyfish authored Oct 8, 2024
2 parents 30a01d1 + 262fd16 commit 226288b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pvr.iptvsimple/addon.xml.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<addon
id="pvr.iptvsimple"
version="21.9.2"
version="21.9.3"
name="IPTV Simple Client"
provider-name="nightik and Ross Nicholson">
<requires>@ADDON_DEPENDS@
Expand Down
3 changes: 3 additions & 0 deletions pvr.iptvsimple/changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
v21.9.3
- Fix XMLTV format check

v21.9.2
- Fix XML file format check
- Always treat special paths as local
Expand Down
6 changes: 3 additions & 3 deletions src/iptvsimple/Epg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -226,9 +226,9 @@ const XmltvFileFormat Epg::GetXMLTVFileFormat(const char* buffer)
if (!buffer)
return XmltvFileFormat::INVALID;

if ((buffer[0] != '\x3C' && buffer[std::strlen(buffer) - 1] != '\x3E') || // Start with < and ends with >
(buffer[0] != '\x3C' && buffer[1] != '\x3F' && buffer[2] != '\x78' && // xml should starts with '<?xml'
buffer[3] != '\x6D' && buffer[4] != '\x6C'))
if ((buffer[0] == '\x3C' && buffer[std::strlen(buffer) - 1] == '\x3E') || // Start with < and ends with >
(buffer[0] == '\x3C' && buffer[1] == '\x3F' && buffer[2] == '\x78' && // xml should starts with '<?xml'
buffer[3] == '\x6D' && buffer[4] == '\x6C'))
{
return XmltvFileFormat::NORMAL;
}
Expand Down

0 comments on commit 226288b

Please sign in to comment.