diff --git a/pvr.iptvsimple/addon.xml.in b/pvr.iptvsimple/addon.xml.in index d02a5d17e..6f920c69e 100644 --- a/pvr.iptvsimple/addon.xml.in +++ b/pvr.iptvsimple/addon.xml.in @@ -1,7 +1,7 @@ @ADDON_DEPENDS@ @@ -21,6 +21,9 @@ icon.png +v19.2.1 +- Support url arguments when encoding file portion of icon URL + v19.2.0 - URL encode last part of tvg logo URL as they can be based on channel names diff --git a/pvr.iptvsimple/changelog.txt b/pvr.iptvsimple/changelog.txt index d16e2488e..aec86351e 100644 --- a/pvr.iptvsimple/changelog.txt +++ b/pvr.iptvsimple/changelog.txt @@ -1,3 +1,6 @@ +v19.2.1 +- Support url arguments when encoding file portion of icon URL + v19.2.0 - URL encode last part of tvg logo URL as they can be based on channel names diff --git a/src/iptvsimple/data/Channel.cpp b/src/iptvsimple/data/Channel.cpp index 1cdddeb90..d5b8d15be 100644 --- a/src/iptvsimple/data/Channel.cpp +++ b/src/iptvsimple/data/Channel.cpp @@ -141,11 +141,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; } } }