xbmc/xbmc — pull request #3529 by jmarshallnz (2013-10-31 06:49:36+00:00)
Title: Switch library:// URLs to 'real' URLs on fetch, rather than list

Up 'til now, when we list a library:// URL we return translated resulting URLs (e.g. we might return videodb://movies/titles/ ) in the list.

This changes it so that we return the corresponding library://movies/titles URL in the list, and when fetching that URL we translate, fetch the directory, and set the new path in the CFileItemList::m_strPath.

Why would we do this? Simple. We currently have two ways to get into a particular videodb:// URL:
1. Via another videodb:// URL.
2. Via a library:// URL.

If we translate when listing a library:// URL, a direct library:// URL is different to the corresponding videodb:// URL. If on the other hand we translate when fetching, it doesn't matter whether we fetch a library:// URL or a videodb:// URL - in either case you'll end up with a videodb:// in the CFileItemList.

@Montellese: this fixes #14573.

I've tested various filtering things and didn't notice any weirdness.