From f3f858306e9fec485b59c5ffcfb6498fcb9dd7d0 Mon Sep 17 00:00:00 2001 From: phunkyfish Date: Mon, 8 Aug 2022 16:33:53 +0100 Subject: [PATCH 1/2] Support url arguments when encoding file portion of icon URL --- src/iptvsimple/data/Channel.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/iptvsimple/data/Channel.cpp b/src/iptvsimple/data/Channel.cpp index 840aaf817..620ab2846 100644 --- a/src/iptvsimple/data/Channel.cpp +++ b/src/iptvsimple/data/Channel.cpp @@ -144,11 +144,20 @@ void Channel::SetIconPathFromTvgLogo(const std::string& tvgLogo, std::string& ch { const std::string urlPath = m_iconPath.substr(0, pos + 1); std::string urlFile = m_iconPath.substr(pos + 1); + + std::string urlArguments; + size_t argumentsPos = urlFile.find("?"); + if (argumentsPos != std::string::npos && argumentsPos > 0) + { + urlArguments = urlFile.substr(argumentsPos); + urlFile = urlFile.substr(0, argumentsPos - 1); + } + if (!utilities::WebUtils::IsEncoded(urlFile)) { urlFile = utilities::WebUtils::UrlEncode(urlFile); - m_iconPath = urlPath + urlFile; + m_iconPath = urlPath + urlFile + urlArguments; } } } From dacc6a3a2c5efe964051747a1949edc5324959e6 Mon Sep 17 00:00:00 2001 From: phunkyfish Date: Wed, 10 Aug 2022 21:31:30 +0100 Subject: [PATCH 2/2] changelog and version - 20.5.1 --- pvr.iptvsimple/addon.xml.in | 2 +- pvr.iptvsimple/changelog.txt | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/pvr.iptvsimple/addon.xml.in b/pvr.iptvsimple/addon.xml.in index d1bdc21dd..20f9c3bab 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 2b4440f14..189abb42c 100644 --- a/pvr.iptvsimple/changelog.txt +++ b/pvr.iptvsimple/changelog.txt @@ -1,3 +1,6 @@ +v20.5.1 +- Support url arguments when encoding file portion of icon URL + v20.5.0 - URL encode last part of tvg logo URL as they can be based on channel names and they can contain spaces and non standard characters not allowed in paths