2010-04-26, 16:41
Woahoo... my code was working afterall. The problem was I'd set the breakpoint before running XBMC and it was being triggered by the rendering engine as soon as I went into a video nav window before the items had been loaded. If I just let it run, then it all works fine and it is working as it should.
I just need to update CXbmcHttp::xbmcSTSetting to do the same thing, with the only problem being I don't know how to trigger it to test my changes.
I'm not sure this would simplify things would it? I mean - yes it would simplify the code to look up the content type, but I would then need code in the enter / exit video nav window code to update position 0 to reflect the correct content type.
I do need to find some tidier way to determine the correct vector index to use, at the moment I have all these ugly code blocks something like
I just need to update CXbmcHttp::xbmcSTSetting to do the same thing, with the only problem being I don't know how to trigger it to test my changes.
kraqh3d Wrote:But while typing this out, I thought of something... why not use position 0 in the vector to store the current content type as an integer which references the correct index to use, with -1 as not valid. Then you can easily do something like this:
I'm not sure this would simplify things would it? I mean - yes it would simplify the code to look up the content type, but I would then need code in the enter / exit video nav window code to update position 0 to reflect the correct content type.
I do need to find some tidier way to determine the correct vector index to use, at the moment I have all these ugly code blocks something like
Code:
if (content == "movies")
iWatchModeIndex = 0;
else if (content == "tvshows")
iWatchModeIndex = 1;
else if (content == "seasons")
iWatchModeIndex = 2;
else if (content == "episodes")
iWatchModeIndex = 3;
else if (content == "musicvideos")
iWatchModeIndex = 4;
bReturn = g_settings.m_WatchMode[iWatchModeIndex] == VIDEO_SHOW_UNWATCHED;