Kodi Community Forum
XBMC scans zips and rars for subtitles - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: OS independent / Other (https://forum.kodi.tv/forumdisplay.php?fid=228)
+---- Thread: XBMC scans zips and rars for subtitles (/showthread.php?tid=137561)



XBMC scans zips and rars for subtitles - ~Coxy - 2012-08-04

Is it possibly to turn off this behaviour? It makes starting to play any video in my dump folder exceedingly slow, as it downloads every archive therein and scans them for subs.


RE: XBMC scans zips and rars for subtitles - ~Coxy - 2012-08-06

I found the problem in the source:

Util.cpp, line ~2361
Code:
CDirectory::GetDirectory(strLookInPaths[step], items,".utf|.utf8|.utf-8|.sub|.srt|.smi|.rt|.txt|.ssa|.text|.ssa|.aqt|.jss|.ass|.idx|.ifo|.rar|.zip",false);
      int fnl = strMovieFileNameNoExt.size();
      
      for (int j = 0; j < items.Size(); j++)
      {
        URIUtils::Split(items[j]->GetPath(), strPath, strItem);
        
        // is this a rar or zip-file
        if (URIUtils::IsRAR(strItem) || URIUtils::IsZIP(strItem))
        {
          ScanArchiveForSubtitles( items[j]->GetPath(), strMovieFileNameNoExt, vecSubtitles );
...

Would be nice for this setting to be configurable like it is for video formats! Rather than a hardcoded string as it stands today.

Now to try to build a fixed version Rofl


RE: XBMC scans zips and rars for subtitles - ~Coxy - 2012-08-06

Hex-editing the exe turned out to be a lot easier and more maintainable then building XBMC from source.
"HxD" is a good free Win32 hex editor.
Just find the string ".utf|.utf8|.utf-8|.sub|.srt|.smi|.rt|.txt|.ssa|.text|.ssa|.aqt|.jss|.ass|.idx|.ifo|.rar|.zip" in XBMC.exe.
Instead of deleting the rar and zip from the end I changed the string so the length of the binary would not be affected.

So it was .ifo|.rar|.zip
I changed it to .ifo|.rrr|.zzz