Skip to content

Commit b73472e

Browse files
authored
Merge pull request #727 from phunkyfish/no-encode-kodi-protocols
Don't URL encode paths using resource:// or special:// protocols
2 parents b6c18e7 + be8cf14 commit b73472e

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

pvr.iptvsimple/addon.xml.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<addon
33
id="pvr.iptvsimple"
4-
version="20.9.0"
4+
version="20.9.1"
55
name="IPTV Simple Client"
66
provider-name="nightik and Ross Nicholson">
77
<requires>@ADDON_DEPENDS@

pvr.iptvsimple/changelog.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
v20.9.1
2+
- Don't URL encode paths using resource:// or special:// protocols
3+
14
v20.9.0
25
- Support async connect
36

src/iptvsimple/data/Channel.cpp

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,16 @@ void Channel::Reset()
116116
m_inputStreamName.clear();
117117
}
118118

119+
namespace
120+
{
121+
122+
bool IsSpecialOrResourceProtocol(const std::string& path)
123+
{
124+
return StringUtils::StartsWith(path, "special://") || StringUtils::StartsWith(path, "resource://");
125+
}
126+
127+
}
128+
119129
void Channel::SetIconPathFromTvgLogo(const std::string& tvgLogo, std::string& channelName)
120130
{
121131
m_iconPath = tvgLogo;
@@ -134,7 +144,7 @@ void Channel::SetIconPathFromTvgLogo(const std::string& tvgLogo, std::string& ch
134144
{
135145
m_iconPath = utilities::WebUtils::UrlEncode(m_iconPath);
136146
}
137-
else if (m_iconPath.find("://") != std::string::npos)
147+
else if (m_iconPath.find("://") != std::string::npos && !IsSpecialOrResourceProtocol(m_iconPath))
138148
{
139149
// 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
140150
// the path should be fine

0 commit comments

Comments
 (0)