/[packages]/cauldron/xbmc/current/SOURCES/0001-fixed-don-t-load-non-matching-archived-subtitles-fix.patch
ViewVC logotype

Contents of /cauldron/xbmc/current/SOURCES/0001-fixed-don-t-load-non-matching-archived-subtitles-fix.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 223735 - (show annotations) (download)
Sat Mar 17 02:13:29 2012 UTC (12 years, 1 month ago) by anssi
File size: 1265 byte(s)
- do not load non-matching subtitles from archives (upstream ticket
  #12719, fixed-don-t-load-non-matching-archived-subtitles-fix.patch,
  applied upstream)
- add a workaround for upgrading from old incompatible addon database
  (hack-workaround-for-old-incompatible-PVR-addon-datab.patch)

1 From 855961923dc0bd363fc1d87ba8f356935ea5e010 Mon Sep 17 00:00:00 2001
2 From: Anssi Hannula <anssi@xbmc.org>
3 Date: Fri, 16 Mar 2012 21:16:00 +0200
4 Subject: [PATCH] fixed: don't load non-matching archived subtitles (fixes
5 #12719)
6
7 Commit ea87f7e8574430 ("removed subtitle caching as it was only needed
8 on xbox, partialy takes care of #9736.") mistakenly removed the filename
9 check for subtitles in zip or rar archives, causing any subtitle file
10 inside archives to be loaded.
11
12 Fix that by re-adding a filename check into
13 CUtil::ScanArchiveForSubtitles().
14 ---
15 xbmc/Util.cpp | 7 ++++++-
16 1 file changed, 6 insertions(+), 1 deletion(-)
17
18 diff --git a/xbmc/Util.cpp b/xbmc/Util.cpp
19 index 6f5326c..7e6489b 100644
20 --- a/xbmc/Util.cpp
21 +++ b/xbmc/Util.cpp
22 @@ -2459,7 +2459,12 @@ int CUtil::ScanArchiveForSubtitles( const CStdString& strArchivePath, const CStd
23 ScanArchiveForSubtitles(strRarInRar,strMovieFileNameNoExt,vecSubtitles);
24 }
25 // done checking if this is a rar-in-rar
26 -
27 +
28 + // check that the found filename matches the movie filename
29 + int fnl = strMovieFileNameNoExt.size();
30 + if (!URIUtils::GetFileName(strPathInRar).Left(fnl).Equals(strMovieFileNameNoExt))
31 + continue;
32 +
33 int iPos=0;
34 while (sub_exts[iPos])
35 {
36 --
37 1.7.9.3
38

  ViewVC Help
Powered by ViewVC 1.1.30