From 423f099c3caac75c128f67960c7c0225c73ee348 Mon Sep 17 00:00:00 2001 From: phunkyfish Date: Sat, 31 Dec 2022 11:26:31 +0000 Subject: [PATCH 1/4] Ensure groups are delimited by semi-colon's when supplied by an EXTGRP tag --- src/iptvsimple/PlaylistLoader.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/iptvsimple/PlaylistLoader.cpp b/src/iptvsimple/PlaylistLoader.cpp index 98c306464..1f702efd3 100644 --- a/src/iptvsimple/PlaylistLoader.cpp +++ b/src/iptvsimple/PlaylistLoader.cpp @@ -544,6 +544,13 @@ std::string PlaylistLoader::ReadMarkerValue(const std::string& line, const std:: markerStart += marker.length(); if (markerStart < line.length()) { + if (marker == M3U_GROUP_MARKER && line[markerStart] != '"') + { + //For this case we just want to return the full string without splitting it + //This is because groups use semi-colons and not spaces as a delimiter + return line.substr(markerStart, line.length()); + } + char find = ' '; if (line[markerStart] == '"') { From 694e1053a2cc2149e43f482d3f7e95079f60afdd Mon Sep 17 00:00:00 2001 From: phunkyfish Date: Sat, 31 Dec 2022 11:29:13 +0000 Subject: [PATCH 2/4] Fix warning from using sprintf by switching to snprintf --- src/iptvsimple/PlaylistLoader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/iptvsimple/PlaylistLoader.cpp b/src/iptvsimple/PlaylistLoader.cpp index 1f702efd3..3b07adbc8 100644 --- a/src/iptvsimple/PlaylistLoader.cpp +++ b/src/iptvsimple/PlaylistLoader.cpp @@ -302,7 +302,7 @@ std::string PlaylistLoader::ParseIntoChannel(const std::string& line, Channel& c if (strTvgId.empty()) { char buff[255]; - sprintf(buff, "%d", std::atoi(infoLine.c_str())); + snprintf(buff, 255, "%d", std::atoi(infoLine.c_str())); strTvgId.append(buff); } From 13c8356ab4ed641ac367301c58ca2970dc9e722d Mon Sep 17 00:00:00 2001 From: phunkyfish Date: Sat, 31 Dec 2022 11:55:17 +0000 Subject: [PATCH 3/4] Don't break if multiple TVG URLs are supplied, just use the first one --- src/iptvsimple/PlaylistLoader.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/iptvsimple/PlaylistLoader.cpp b/src/iptvsimple/PlaylistLoader.cpp index 3b07adbc8..bd41ac0ea 100644 --- a/src/iptvsimple/PlaylistLoader.cpp +++ b/src/iptvsimple/PlaylistLoader.cpp @@ -123,6 +123,11 @@ bool PlaylistLoader::LoadPlayList() std::string tvgUrl = ReadMarkerValue(line, TVG_URL_MARKER); if (tvgUrl.empty()) tvgUrl = ReadMarkerValue(line, TVG_URL_OTHER_MARKER); + // The tvgUrl might be a comma separated list. If it is just take + // the first one as we don't support multiple list but at least it will work. + size_t found = tvgUrl.find(','); + if (found != std::string::npos) + tvgUrl = tvgUrl.substr(0, found); Settings::GetInstance().SetTvgUrl(tvgUrl); continue; From 92ff5275055866ced32c86954f4ff28645e52436 Mon Sep 17 00:00:00 2001 From: phunkyfish Date: Sat, 31 Dec 2022 11:30:44 +0000 Subject: [PATCH 4/4] changelog and version 20.6.1 --- pvr.iptvsimple/addon.xml.in | 2 +- pvr.iptvsimple/changelog.txt | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/pvr.iptvsimple/addon.xml.in b/pvr.iptvsimple/addon.xml.in index ae08db734..d0a15ee84 100644 --- a/pvr.iptvsimple/addon.xml.in +++ b/pvr.iptvsimple/addon.xml.in @@ -1,7 +1,7 @@ @ADDON_DEPENDS@ diff --git a/pvr.iptvsimple/changelog.txt b/pvr.iptvsimple/changelog.txt index b88f7aee1..326b189f3 100644 --- a/pvr.iptvsimple/changelog.txt +++ b/pvr.iptvsimple/changelog.txt @@ -1,3 +1,8 @@ +v20.6.1 +- Ensure groups are delimited by semi-colon's when suoplied by an EXTGRP tag +- Don't break if multiple TVG URLs are supplied, just use the first one +- Fix warning from using sprintf by switching to snprintf + v20.6.0 - Kodi inputstream API update to version 3.2.0 - Kodi PVR API update to version 8.0.2