xbmc/xbmc — pull request #658 by jmarshallnz (2012-01-26 00:22:01+00:00)
Title: Getdirectory: Use flags rather than a bunch of bools

This does exactly what it says: implements all the bools (except the "allow threading" one) in CDirectory::GetDirectory as flags instead.

The defaults for the flags are the same as the previous defaults, so this is mostly code-shuffle. I've carefully reviewed each change, but still might have missed one - just running through and comparing the previous defaults with what is there now.

The second commit is a change in behaviour. Basically I reviewed cases where we were setting allowThreads to true. Anything that was either already threaded, or should be threaded through different means (eg throw off a job to do the whole function) was removed. The remaining cases are UI dir fetches, slideshow dir fetches, and smartplaylist dir fetches.

The last commit is removing a clearing of the cache during subtitle fetching which was a left over from the refactor that caused a bunch of confusion in the beginning.

One final thing for consideration: Are the defaults sane? Primarily, should we be fetching filedirectories by default with every CDirectory::GetDirectory() call? This is currently the largest flag that we specify (turning off that feature) and I suspect there's a bunch of places where we're needlessly doing this.

Not for Eden.