diff --git a/xbmc/Util.cpp b/xbmc/Util.cpp index 1760beb010f2c..c3563481b2631 100644 --- a/xbmc/Util.cpp +++ b/xbmc/Util.cpp @@ -1898,11 +1898,11 @@ void CUtil::ScanForExternalSubtitles(const std::string& strMovie, std::vector strLookInPaths; std::string strMovieFileName; - std::string strPath; + std::string strMoviePath; - URIUtils::Split(strMovie, strPath, strMovieFileName); + URIUtils::Split(strMovie, strMoviePath, strMovieFileName); std::string strMovieFileNameNoExt(URIUtils::ReplaceExtension(strMovieFileName, "")); - strLookInPaths.push_back(strPath); + strLookInPaths.push_back(strMoviePath); CURL url(strMovie); std::string isoFileNameNoExt; @@ -1944,8 +1944,8 @@ void CUtil::ScanForExternalSubtitles(const std::string& strMovie, std::vector dir. if (CMediaSettings::Get().GetAdditionalSubtitleDirectoryChecked() == 1) { - strPath = CSettings::Get().GetString("subtitles.custompath"); - URIUtils::AddSlashAtEnd(strPath); - strLookInPaths.push_back(strPath); + std::string strPath2 = CSettings::Get().GetString("subtitles.custompath"); + URIUtils::AddSlashAtEnd(strPath2); + strLookInPaths.push_back(strPath2); } std::string strDest; @@ -2023,7 +2023,8 @@ void CUtil::ScanForExternalSubtitles(const std::string& strMovie, std::vectorGetPath(), strPath, strItem); + std::string strSubtitlePath; + URIUtils::Split(items[j]->GetPath(), strSubtitlePath, strItem); if (StringUtils::StartsWithNoCase(strItem, strMovieFileNameNoExt) || (!isoFileNameNoExt.empty() && StringUtils::StartsWithNoCase(strItem, isoFileNameNoExt)))