aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArne Morten Kvarving <spiff@kodi.tv>2019-11-06 13:31:09 +0100
committerArne Morten Kvarving <spiff@kodi.tv>2019-11-12 14:11:55 +0100
commit28fa2af7634cb8ca6561a1e44c937bf6ea797cb1 (patch)
tree790e0a127016650c794d83374b433aaaed3e9a43
parent3be3c3d9f418630709137d4b76bb1feb3643e4e7 (diff)
fixed: support shoutcast over https
we can no longer blindly replace protocol with http since shoutcast over https is now a thing. replace shout:// protocol with http replace shouts://protocol with https
-rw-r--r--xbmc/filesystem/FileFactory.cpp2
-rw-r--r--xbmc/filesystem/ShoutcastFile.cpp5
2 files changed, 5 insertions, 2 deletions
diff --git a/xbmc/filesystem/FileFactory.cpp b/xbmc/filesystem/FileFactory.cpp
index 1ab31bff47..7e70fff481 100644
--- a/xbmc/filesystem/FileFactory.cpp
+++ b/xbmc/filesystem/FileFactory.cpp
@@ -137,7 +137,7 @@ IFile* CFileFactory::CreateLoader(const CURL& url)
|| url.IsProtocol("http")
|| url.IsProtocol("https")) return new CCurlFile();
else if (url.IsProtocol("dav") || url.IsProtocol("davs")) return new CDAVFile();
- else if (url.IsProtocol("shout")) return new CShoutcastFile();
+ else if (url.IsProtocol("shout") || url.IsProtocol("shouts")) return new CShoutcastFile();
#ifdef HAS_FILESYSTEM_SMB
#ifdef TARGET_WINDOWS
else if (url.IsProtocol("smb")) return new CWin32SMBFile();
diff --git a/xbmc/filesystem/ShoutcastFile.cpp b/xbmc/filesystem/ShoutcastFile.cpp
index c3fb6e29c6..e754f84db7 100644
--- a/xbmc/filesystem/ShoutcastFile.cpp
+++ b/xbmc/filesystem/ShoutcastFile.cpp
@@ -57,7 +57,10 @@ bool CShoutcastFile::Open(const CURL& url)
{
CURL url2(url);
url2.SetProtocolOptions(url2.GetProtocolOptions()+"&noshout=true&Icy-MetaData=1");
- url2.SetProtocol("http");
+ if (url.GetProtocol() == "shouts")
+ url2.SetProtocol("https");
+ else if (url.GetProtocol() == "shout")
+ url2.SetProtocol("http");
bool result = m_file.Open(url2);
if (result)