Skip to content

Commit

Permalink
Merge pull request xbmc#16874 from notspiff/fix_shoutcast_https
Browse files Browse the repository at this point in the history
fixed: support shoutcast over https
  • Loading branch information
notspiff authored and Maven85 committed Jan 21, 2020
1 parent 961d3f4 commit 146073b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion xbmc/filesystem/FileFactory.cpp
Expand Up @@ -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();
Expand Down
5 changes: 4 additions & 1 deletion xbmc/filesystem/ShoutcastFile.cpp
Expand Up @@ -58,7 +58,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)
Expand Down

0 comments on commit 146073b

Please sign in to comment.