From 5c3a005875253c13b042893073373c41595623a2 Mon Sep 17 00:00:00 2001 From: phunkyfish Date: Wed, 22 Mar 2023 20:53:11 +0000 Subject: [PATCH 1/2] Don't URL encode paths using resource:// or special:// protocols --- src/iptvsimple/data/Channel.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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 From 2fde0d3ed024482f38245bac061ee5ddf590d5dd Mon Sep 17 00:00:00 2001 From: phunkyfish Date: Wed, 22 Mar 2023 20:57:44 +0000 Subject: [PATCH 2/2] changelog and version v21.2.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 ae9145046..125d721df 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 06361b52d..ab9999339 100644 --- a/pvr.iptvsimple/changelog.txt +++ b/pvr.iptvsimple/changelog.txt @@ -1,3 +1,6 @@ +v21.2.1 +- Don't URL encode paths using resource:// or special:// protocols + v21.2.0 - Support async connect