(2013-02-07, 09:26)bondaki Wrote: For anime, what iI do is use this, just after the 3number tv show regex's in prepend from this forum, otherwise it finds many false positives
<regexp>[/\._\-]()(\d{2,3})([^\\/]+)$</regexp>
This doesn't seem to do anything different in my case. (Inserted into the prepend area of v2.3 where you specified)
Either that, or XBMC has decided it's no longer listening to changes made to advancedsettings.xml
What kind of response should I be looking for out of the regex in order to XBMC to 'understand' what the episode number?
Running the original regex I had (provided in v2.3 from Post #2) through pythonregex.com, using
Code Geass Hangyaku no Lelouch - 01 - The Day a New Demon Was Born - [OZC](bfe4e9eb).mkv as an example, returns the following.
Code:
>>> regex = re.compile("(?i)()(?:[\. _-]|ep)(\d{1,3})[\. _-v].*[[({][\da-f]{8}[])}]")
>>> r = regex.search(string)
>>> r
<_sre.SRE_Match object at 0xe539b65a74cdded0>
>>> regex.match(string)
None
# List the groups found
>>> r.groups()
(u'', u'01')
# List the named dictionary objects found
>>> r.groupdict()
{}
# Run findall
>>> regex.findall(string)
[(u'', u'01')]
# Run timeit test
>>> setup = ur"import re; regex =re.compile("(?i)()(?:[\. _-]|ep)(\d{1,3})[\. _-v].*[[({][ ...
>>> t = timeit.Timer('regex.search(string)',setup)
>>> t.timeit(10000)
0.179860115051
Now I can see within here that it's grabbing the episode number and seemingly ignoring every other piece of data, but what is XBMC looking for exactly, in order to determine that this 'file' is a valid episode, and proceed with scraping the information?