xbmc/xbmc — pull request #4837 by mkortstiege (2014-06-01 13:17:55+00:00)
Title: Videoinfoscanner optimi

This commit series modifies the videoinfoscanner to be less expensive when scanning for new content.

In order to speed up the scan process, I've modified all CDirectory::GetDirectory calls to not stat for additional file information. Note, this is not yet supported by all filesystem implementations. SMB and AFP already honor the dir flag.

Furthermore I've changed the way we're checking whether or not a directory is able to fasthash. This is done by filtering the items based on the appropriate excludefromscan expressions before counting the subfolders. The exclude expressions are appended to the generated md5 hash to ensure we're doing a re-scan whenever the users changes those.

As for series, it now uses a recursive fast hash method for enumerating series folders. This allows us
to determine whether or not new content was added without wasting time stating every single episode.

The last commit in this series fixes an issue that's also present in current master. Due to the nature of DoScan we
don't recurse for CONTENT == tvshows. In order to avoid hitting paths twice, we have to remove them from the list right after enumerating the series folder.

@jmarshallnz for review please.