diff --git a/pvr.iptvsimple/addon.xml.in b/pvr.iptvsimple/addon.xml.in index 819af9625..e93d1d911 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 a023cd75f..59003d94f 100644 --- a/pvr.iptvsimple/changelog.txt +++ b/pvr.iptvsimple/changelog.txt @@ -1,3 +1,6 @@ +v20.9.1 +- Don't URL encode paths using resource:// or special:// protocols + v20.9.0 - Support async connect diff --git a/src/iptvsimple/data/Channel.cpp b/src/iptvsimple/data/Channel.cpp index 4f061fb83..974f774cb 100644 --- a/src/iptvsimple/data/Channel.cpp +++ b/src/iptvsimple/data/Channel.cpp @@ -116,6 +116,16 @@ void Channel::Reset() m_inputStreamName.clear(); } +namespace +{ + +bool IsSpecialOrResourceProtocol(const std::string& path) +{ + return StringUtils::StartsWith(path, "special://") || StringUtils::StartsWith(path, "resource://"); +} + +} + void Channel::SetIconPathFromTvgLogo(const std::string& tvgLogo, std::string& channelName) { m_iconPath = tvgLogo; @@ -134,7 +144,7 @@ void Channel::SetIconPathFromTvgLogo(const std::string& tvgLogo, std::string& ch { m_iconPath = utilities::WebUtils::UrlEncode(m_iconPath); } - else if (m_iconPath.find("://") != std::string::npos) + else if (m_iconPath.find("://") != std::string::npos && !IsSpecialOrResourceProtocol(m_iconPath)) { // we also want to check the last part of a URL to ensure it's valid as quite often they are based on channel names // the path should be fine