/* url encoded. if handed from ftpdirectory */
/* it won't be so let's handle that case */
- CStdString partial, filename(url2.GetFileName());
+ CStdString filename(url2.GetFileName());
std::vector<std::string> array;
// if server sent us the filename in non-utf8, we need send back with same encoding.
if(it != array.begin())
filename += "/";
- partial = *it;
- partial = CURL::Encode(partial);
- filename += partial;
+ filename += CURL::Encode(*it);
}
/* make sure we keep slashes */
void CMultiPathDirectory::AddToMultiPath(CStdString& strMultiPath, const CStdString& strPath)
{
- CStdString strPath1 = strPath;
URIUtils::AddSlashAtEnd(strMultiPath);
//CLog::Log(LOGDEBUG, "-- adding path: %s", strPath.c_str());
- strPath1 = CURL::Encode(strPath1);
- strMultiPath += strPath1;
+ strMultiPath += CURL::Encode(strPath);
strMultiPath += "/";
}
CStdString CSMBDirectory::GetMountPoint(const CStdString &strType, const CStdString &strName)
{
- CStdString strPath = strType + strName;
- strPath = CURL::Encode(strPath);
+ CStdString strPath(CURL::Encode(strType + strName));
#if defined(TARGET_DARWIN)
CStdString str = getenv("HOME");
CStdString CSMB::URLEncode(const CStdString &value)
{
- CStdString encoded(value);
- encoded = CURL::Encode(encoded);
- return encoded;
+ return CURL::Encode(value);
}
/* This is called from CApplication::ProcessSlow() and is used to tell if smbclient have been idle for too long */
CFileItemPtr item(new CFileItem("", true));
CURL url;
url.SetProtocol("zeroconf");
- CStdString service_path = CZeroconfBrowser::ZeroconfService::toPath(*it);
- service_path = CURL::Encode(service_path);
+ CStdString service_path(CURL::Encode(CZeroconfBrowser::ZeroconfService::toPath(*it)));
url.SetFileName(service_path);
item->SetPath(url.Get());
void CGUIWindowMusicNav::OnSearchUpdate()
{
- CStdString search(GetProperty("search").asString());
- search = CURL::Encode(search);
+ CStdString search(CURL::Encode(GetProperty("search").asString()));
if (!search.empty())
{
CStdString path = "musicsearch://" + search + "/";
if (status != AIRPLAY_STATUS_NEED_AUTH)
{
- CStdString userAgent="AppleCoreMedia/1.0.0.8F455 (AppleTV; U; CPU OS 4_3 like Mac OS X; de_de)";
- userAgent = CURL::Encode(userAgent);
+ CStdString userAgent(CURL::Encode("AppleCoreMedia/1.0.0.8F455 (AppleTV; U; CPU OS 4_3 like Mac OS X; de_de)"));
location += "|User-Agent=" + userAgent;
CFileItem fileToPlay(location, false);
url = "image/";
else
url = "vfs/";
- strPath = CURL::Encode(strPath);
- url += strPath;
+ url += CURL::Encode(strPath);
details["path"] = url;
return true;
}
{
NPT_String path = "upnp://"+device->GetUUID()+"/";
if (!NPT_StringsEqual(item_id, "0")) {
- CStdString id = item_id;
- id = CURL::Encode(id);
+ CStdString id(CURL::Encode(item_id));
URIUtils::AddSlashAtEnd(id);
path += id.c_str();
}
size_t i2;
if ((i2 = strDirty.find("!!!ENCODE!!!",i+12)) != std::string::npos)
{
- strBuffer = strDirty.substr(i+12,i2-i-12);
- strBuffer = CURL::Encode(strBuffer);
+ strBuffer = CURL::Encode(strDirty.substr(i + 12, i2 - i - 12));
strDirty.replace(i, i2-i+12, strBuffer);
i += strBuffer.size();
}
{
if (entry.m_spoof.empty())
return entry.m_url;
- CStdString spoof = entry.m_spoof;
- spoof = CURL::Encode(spoof);
- return entry.m_url + "|Referer=" + spoof;
+
+ return entry.m_url + "|Referer=" + CStdString(CURL::Encode(entry.m_spoof));
}
void CScraperUrl::GetThumbURLs(std::vector<CStdString> &thumbs, const std::string &type, int season) const
const CStdString& strFilePathInArchive,
const CStdString& strPwd)
{
- CStdString strBuffer;
-
strUrlPath = strType+"://";
if( !strPwd.empty() )
{
- strBuffer = strPwd;
- strBuffer = CURL::Encode(strBuffer);
- strUrlPath += strBuffer;
+ strUrlPath += CURL::Encode(strPwd);
strUrlPath += "@";
}
- strBuffer = strArchivePath;
- strBuffer = CURL::Encode(strBuffer);
-
- strUrlPath += strBuffer;
+ strUrlPath += CURL::Encode(strArchivePath);
- strBuffer = strFilePathInArchive;
+ CStdString strBuffer(strFilePathInArchive);
StringUtils::Replace(strBuffer, '\\', '/');
StringUtils::TrimLeft(strBuffer, "/");