XBMC scans zips and rars for subtitles

  Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
~Coxy Offline
Junior Member
Posts: 6
Joined: Jul 2012
Reputation: 0
Post: #1
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.
find quote
~Coxy Offline
Junior Member
Posts: 6
Joined: Jul 2012
Reputation: 0
Post: #2
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
(This post was last modified: 2012-08-06 05:08 by ~Coxy.)
find quote
~Coxy Offline
Junior Member
Posts: 6
Joined: Jul 2012
Reputation: 0
Post: #3
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
find quote