Skip to content

Commit

Permalink
[subtitle] fix subtitles archive in archive
Browse files Browse the repository at this point in the history
Some subtitle packages have itself as e.g. *.rar and the subtitle file
inside also as *.rar.

This checks the given extensions about and recall the function
on this again.
  • Loading branch information
AlwinEsch committed Jul 22, 2020
1 parent 28c35a9 commit 3cd45ac
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions xbmc/Util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1945,6 +1945,14 @@ int CUtil::ScanArchiveForAssociatedItems(const std::string& strArchivePath,
std::string strPathInRar = item->GetPath();
std::string strExt = URIUtils::GetExtension(strPathInRar);

// Check another archive in archive
if (strExt == ".zip" || strExt == ".rar")
{
nItemsAdded +=
ScanArchiveForAssociatedItems(strPathInRar, videoNameNoExt, item_exts, associatedFiles);
continue;
}

// check that the found filename matches the movie filename
size_t fnl = videoNameNoExt.size();
// NOTE: We don't know if videoNameNoExt is URL-encoded, so try both
Expand Down

0 comments on commit 3cd45ac

Please sign in to comment.