From a10def9b8f0366c2b3d3fb01467b8e66bfaa83c5 Mon Sep 17 00:00:00 2001 From: arnova Date: Tue, 3 Feb 2015 11:43:31 +0100 Subject: [PATCH] fixed: External subs in (local) custom folder did not work with url encoded files --- xbmc/Util.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/xbmc/Util.cpp b/xbmc/Util.cpp index c3563481b2631..e176ea1a60939 100644 --- a/xbmc/Util.cpp +++ b/xbmc/Util.cpp @@ -2025,8 +2025,11 @@ void CUtil::ScanForExternalSubtitles(const std::string& strMovie, std::vectorGetPath(), strSubtitlePath, strItem); + + // Make sure filename uses the correct encoding + std::string strMovieFileNameNoExt2 = URIUtils::ChangeBasePath(strMoviePath, strMovieFileNameNoExt, strSubtitlePath, false); - if (StringUtils::StartsWithNoCase(strItem, strMovieFileNameNoExt) + if (StringUtils::StartsWithNoCase(strItem, strMovieFileNameNoExt2) || (!isoFileNameNoExt.empty() && StringUtils::StartsWithNoCase(strItem, isoFileNameNoExt))) { // is this a rar or zip-file @@ -2053,8 +2056,11 @@ void CUtil::ScanForExternalSubtitles(const std::string& strMovie, std::vectorGetPath(), strMovieFileNameNoExt, vecSubtitles ); + ScanArchiveForSubtitles(items[j]->GetPath(), strMovieFileNameNoExt2, vecSubtitles ); } } }