Preserve case in input buffers ?
#1
I want to modify an existing scraper to take into account my camelcase named folders.
Unfortunately after several hours of try-and-failing and reading this forum it turns out that the frameworks tries to be smart and for some reason down cases the variable passed to $$1 .

So that kind of means game over to dealing with camelcase Sad

Now looking at some of the forum posts and checking the ScraperParser.cpp code, i found the little undocumented cs="yes" option which gave me a little bit of hope, but unfortunately it is only about the case sensitivity of the regular expression. By the time the input string reaches the regexp the damage has already been done, so that only covers half of the story.

Is there another option I missed so far to prevent the lowercasing of the input string ?
I could not immediately find where this is done in the ScraperParser.cpp code (seems to be happen before m_param[0] is assigned to the input string, which happens in an other source file I guess), so i have a little hope left that can be controlled somehow.
This hope is also fueled by the fact that I don't see a scenario where the cs option can be useful if the input string is always ToLower'ed, so as the cs was introduced at some point it could only have been because someone managed to get an input string with upper cases in it.

Any suggestions would be welcome
Reply
#2
UPDATE:
I did some further digging, the cruelpit is in Scraper.cpp:

std::vector<CScraperUrl> CScraper::FindMovie(XFILE::CCurlFile &fcurl, const CStdString &sMovie, bool fFirst)
{
....

CLog::Log(LOGDEBUG, "%s: Searching for '%s' using %s scraper "
"(path: '%s', content: '%s', version: '%s')", __FUNCTION__, sTitle.c_str(),
Name().c_str(), Path().c_str(),
ADDON::TranslateContent(Content()).c_str(), Version().c_str());

sTitle.ToLower();

....
}

So that is a hard coded unconditional lower casing operation, I will have to recompile xmbc to get rid of this... Sad
Reply



Logout Mark Read Team Forum Stats Members Help
Preserve case in input buffers ?0
This forum uses Lukasz Tkacz MyBB addons.