aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlwin Esch <alwin.esch@web.de>2020-07-22 14:58:03 +0200
committerAlwin Esch <alwin.esch@web.de>2020-07-22 14:58:50 +0200
commit3cd45acd5a623747c79d0a5219ea1303a5fb0275 (patch)
tree8a4c02e1d590680f193f524b1e2fc07fb71a81c5
parent28c35a9101577f07771d9132763d8a083073a138 (diff)
[subtitle] fix subtitles archive in archive
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.
-rw-r--r--xbmc/Util.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/xbmc/Util.cpp b/xbmc/Util.cpp
index 5fde1eccf6..4eac37e9e5 100644
--- a/xbmc/Util.cpp
+++ b/xbmc/Util.cpp
@@ -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