redone for SubsCore branch of XBMC