Skip to content

Commit

Permalink
fixed: External subs in (local) custom folder did not work with url e…
Browse files Browse the repository at this point in the history
…ncoded files
  • Loading branch information
arnova committed Feb 3, 2015
1 parent e72860f commit a10def9
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions xbmc/Util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2025,8 +2025,11 @@ void CUtil::ScanForExternalSubtitles(const std::string& strMovie, std::vector<st
{
std::string strSubtitlePath;
URIUtils::Split(items[j]->GetPath(), 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
Expand All @@ -2053,8 +2056,11 @@ void CUtil::ScanForExternalSubtitles(const std::string& strMovie, std::vector<st
// is this a rar or zip-file
if (URIUtils::IsRAR(strItem) || URIUtils::IsZIP(strItem))
{
// Make sure filename uses the correct encoding
std::string strMovieFileNameNoExt2 = URIUtils::ChangeBasePath(strMoviePath, strMovieFileNameNoExt, "", false);

// check strMovieFileNameNoExt in zip-file
ScanArchiveForSubtitles( items[j]->GetPath(), strMovieFileNameNoExt, vecSubtitles );
ScanArchiveForSubtitles(items[j]->GetPath(), strMovieFileNameNoExt2, vecSubtitles );
}
}
}
Expand Down

0 comments on commit a10def9

Please sign in to comment.