See https://github.com/xbmc/xbmc/pull/3097/files#L3R170