In simple terms adding this to your Kodi configuration will match more TV shows than Kodi will by default.
After several months assisting users via IRC I decided to create a generic set of additional REGEX expressions to catch TV episodes Kodi does not and will not by default (e.g. Topaz etc) for fun. Quite a bit of offline testing has been completed, and whilst I am confident I cannot guarantee this REGEX will not produce some false positives.
The method used in this REGEX differs from Kodi default methodology in SOME places by extracting the season number from folder names rather than the file name. By doing this we can match stuff that otherwise could never be matched.
13.show.dvd.avi only has the ep number but "MyShow/season 2/13.show.dvd.avi" has both.
"MyShow/season 5/4400513.show.dvd.avi has a show name that includes numbers making matching very difficult.
Adding additional TV episode matching is simply a matter of inserting the code listed later to the a file called advancedsettings.xml.
To locate and understand this XML file read the first part of this link http://kodi.wiki/view/Advancedsettings
Remember by default advancedsettings.xml will NOT exist. Also note the name of this file IS CASE SENSITIVE and will require a Kodi restart to be applied.
End to end installation should take no more than 2 minutes.
Required Folder Structure
Approximately 50% of this REGEX requires you to have a sensible folder structure for your TV shows as follows:
/showname/season x/episodes e.g. The Unit/season 2/the.unit.203.avi
Note: Case is irrelevant
Note: This is "Season 1" and NOT "Season 01"
If you do not have this structure 50% of these REGEX's will NOT work for you.
I have had some requests to support different structures. Whilst I am happy to accommodate some slight differences I cannot support multiple languages or weird ass structures. In the end trying to support this would make the REGEX ridiculously complicated for the majority of users whilst only helping a minority.
The chosen structure was decided on after months of seeing what users had developed on their own. Most came to this structure independently and I am happy with it.
You are welcome to experiment with this REGEX and report back if you need help or have some suggestions.
I will maintain these first few post. I will happily add new REGEX under a few small conditions:
1. The format you are trying to match allows for a good chance of no false positives i.e. its not my intention to try and deal with absolute rubbish naming dredged from the bowels of the internet.
2. The format you are trying to match will be useful to other people. If the matches will only ever be of use to you alone then this set is not the place for it.
3. If you are suggesting REGEX please supply a couple of examples of the full path you are matching against so I/we can test it.
4. I wont be adding REGEX or updating the existing ones with über complex/1337 REGEX just because it can be done more cleverly. Or put another way we need to keep these simple so normal users can get to grips with them.
If you wish support please do the following (NONE OF WHICH ARE OPTIONAL):
#Update to the very latest stable release of Kodi.
#Post a COMPLETE debug log to pastebin.com (no where else) and link it here (make sure this log catches the update library procedure.
#The DEBUG log should contain lines with "DEBUG: could not enumerate file" or entry's which are matched incorrectly. If it does not contain these elements then you do not need help.
#The DEBUG log should show that you are using this complete REGEX set and not small parts of it. The reason for this is that I cannot easily identify which set you are running but mostly the order in which these REGEX run is very important.
If you don't do these 4 simple things I cannot help and wont even bother. Sorry but time is to short to help those that wont help themselves
An again... DO NOT post hand written examples of problem file names or things you wish to match. I NEED the failed to enumerate lines to see what Kodi is seeing not what you think it is seeing.
Please, this thread is for discussions on THIS REGEX compilation only. It is not for random REGEX support, how do i setup advancedsettings, why doesn't my library work or anything else. For all other topics create a new thread.