Bug Problematic handling of RegEx expression in AdvancedSettings.cpp
#1
Hello

I have issues with some regular expressions that are used for recognition of season and episode numbers from TV series.
An expression that works fine within a standalone RegEx checker fail in XBMC. I decided to build XBMC to debug the complete handling.

Due to the investigation I found the rootcause in the AdvancedSettings.cpp in the code that reads the expression from the XML file.
After the expression is read from XML in the method GetCustomTVRegexps [line: 1193] the following code is executed:

Code:
CStdString regExp = pRegExp->FirstChild()->Value();
regExp.MakeLower();

This is not very good for regular expression as e.g. (\d+) means something different than (\D+). Some of my expressions fail because of this. I would suggest to remove the MakeLower() call from this method.

If nobody objects I would like to create an official bug in TRAC and I would be also willing to fix it. Its a very small fix, so if anybody works on that file it would be nice to just fix it as well Smile


Thanks.
Reply
#2
Hi,
I went ahead and created pull request https://github.com/xbmc/xbmc/pull/2851 Wink

Nice find!
Always read the XBMC online-manual, FAQ and search the forums before posting.
Do NOT e-mail Team-XBMC members asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting, make sure you read this first

My previous forum/trac nickname: grajen3
Reply
#3
No objections from my side Cool
I created a regular expression that is able to handle season and episode number extraction in nearly 99% of all anime files nowadays (tested with about 20.000 episodes) and its a pity that it does not work correctly because of this issue.
Reply
#4
Aaaaaaand merged. Thanks for this very detailed bug report!
Always read the XBMC online-manual, FAQ and search the forums before posting.
Do NOT e-mail Team-XBMC members asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting, make sure you read this first

My previous forum/trac nickname: grajen3
Reply

Logout Mark Read Team Forum Stats Members Help
Problematic handling of RegEx expression in AdvancedSettings.cpp0