Extra REGEX for TV Show Episode matching
(2009-05-24, 11:36)xexe Wrote:
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.


Examples:

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.

Installation

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 Advancedsettings (wiki)
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

=2Note: Case is irrelevant
=2Note: 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.

Feedback

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.


Support

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 Smile

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.

[/b]

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.

Happy hunting Smile

Thank you
Reply


Messages In This Thread
[No subject] - by xexe - 2009-06-04, 10:32
[No subject] - by xexe - 2009-06-06, 11:58
[No subject] - by xexe - 2009-06-10, 12:44
[No subject] - by xexe - 2009-06-28, 13:00
[No subject] - by havix - 2009-08-10, 22:22
[No subject] - by jmarshall - 2009-08-11, 00:07
[No subject] - by xexe - 2009-08-16, 12:16
[No subject] - by j3ff - 2009-09-10, 04:37
[No subject] - by dc_williamson - 2009-09-10, 15:54
[No subject] - by locust - 2009-09-14, 23:41
[No subject] - by locust - 2009-09-22, 01:56
[No subject] - by EvilMatt666 - 2009-11-07, 01:03
[No subject] - by jmarshall - 2009-11-07, 04:18
[No subject] - by xexe - 2009-11-10, 14:57
[No subject] - by xexe - 2009-11-11, 14:22
[No subject] - by xexe - 2009-11-16, 12:06
[No subject] - by biggles - 2009-11-17, 11:29
[No subject] - by xexe - 2009-11-17, 12:25
[No subject] - by outleradam - 2009-11-20, 02:22
[No subject] - by Hjord - 2009-11-23, 18:40
[No subject] - by xexe - 2009-11-23, 18:50
[No subject] - by Hjord - 2009-11-23, 18:55
[No subject] - by xexe - 2009-11-23, 19:23
[No subject] - by jpf55 - 2009-11-23, 19:39
[No subject] - by outleradam - 2009-11-23, 20:36
[No subject] - by Hjord - 2009-11-23, 21:19
[No subject] - by Hjord - 2009-11-23, 21:55
[No subject] - by xexe - 2009-11-23, 22:22
[No subject] - by Hjord - 2009-11-23, 22:45
[No subject] - by xexe - 2009-11-23, 23:20
[No subject] - by Hjord - 2009-11-23, 23:41
[No subject] - by xexe - 2009-11-24, 09:45
[No subject] - by WaRSTeaM - 2009-11-27, 16:33
[No subject] - by Faustus - 2009-11-27, 21:21
[No subject] - by tomkiley - 2009-11-28, 03:38
[No subject] - by xexe - 2009-11-28, 09:11
[No subject] - by jrubenol - 2009-11-28, 09:16
[No subject] - by xexe - 2009-11-29, 00:50
[No subject] - by tomkiley - 2009-11-29, 01:05
[No subject] - by outleradam - 2009-11-29, 21:33
[No subject] - by xexe - 2009-11-29, 21:35
No TV Shows Appearing - by jrubenol - 2009-11-29, 23:34
[No subject] - by xexe - 2009-11-30, 13:23
[No subject] - by xexe - 2009-11-30, 13:31
[No subject] - by jrubenol - 2009-11-30, 19:41
[No subject] - by xexe - 2009-11-30, 20:09
[No subject] - by outleradam - 2009-11-30, 20:25
[No subject] - by xexe - 2009-11-30, 22:04
[No subject] - by jrubenol - 2009-11-30, 23:01
[No subject] - by outleradam - 2009-11-30, 23:47
[No subject] - by xexe - 2009-11-30, 23:55
[No subject] - by jrubenol - 2009-12-01, 01:00
[No subject] - by jrubenol - 2009-12-01, 05:17
[No subject] - by xexe - 2009-12-01, 11:06
[No subject] - by xexe - 2009-12-05, 12:05
[No subject] - by xexe - 2009-12-06, 14:31
[No subject] - by outleradam - 2009-12-10, 07:00
[No subject] - by xexe - 2009-12-11, 12:02
[No subject] - by xexe - 2009-12-13, 10:45
[No subject] - by xexe - 2009-12-13, 13:46
[No subject] - by xexe - 2009-12-16, 12:20
[No subject] - by xexe - 2009-12-21, 11:49
[No subject] - by wookietv - 2009-12-30, 09:35
[No subject] - by xexe - 2009-12-30, 11:57
[No subject] - by mrt2 - 2010-01-01, 21:59
[No subject] - by jpf55 - 2010-01-01, 22:09
[No subject] - by xexe - 2010-01-03, 12:48
[No subject] - by n3rdyguy - 2010-01-04, 22:39
[No subject] - by xexe - 2010-01-05, 02:47
[No subject] - by n3rdyguy - 2010-01-05, 20:25
hmm - by n3rdyguy - 2010-01-05, 21:53
[No subject] - by xexe - 2010-01-05, 22:12
[No subject] - by n3rdyguy - 2010-01-05, 23:26
[No subject] - by xexe - 2010-01-06, 01:44
[No subject] - by _Shorty - 2010-01-07, 13:31
[No subject] - by xexe - 2010-01-16, 12:20
[No subject] - by _Shorty - 2010-01-16, 15:04
[No subject] - by xexe - 2010-01-18, 14:16
[No subject] - by tofen - 2010-01-24, 19:14
[No subject] - by xexe - 2010-01-24, 22:08
[No subject] - by tofen - 2010-01-25, 12:53
[No subject] - by gipper - 2010-04-14, 07:19
[No subject] - by Handa - 2010-06-06, 17:18
[No subject] - by CrimsonIdol8 - 2010-06-15, 20:00
[No subject] - by Flomaster - 2010-06-16, 05:30
[No subject] - by Handa - 2010-06-16, 07:37
[No subject] - by Biznitch - 2010-06-21, 09:31
[No subject] - by xexe - 2010-06-24, 10:11
[No subject] - by Biznitch - 2010-06-27, 16:09
[No subject] - by Varazir - 2010-07-14, 18:54
[No subject] - by Varazir - 2010-07-17, 11:45
[No subject] - by Faldaani - 2010-07-17, 22:35
[No subject] - by Faldaani - 2010-07-18, 12:20
[No subject] - by gaborm - 2010-07-25, 04:54
don't scan sample folders - by Kringlan - 2010-08-07, 17:35
[No subject] - by rbrohman - 2010-08-14, 20:35
[No subject] - by snyft - 2010-08-15, 18:05
[No subject] - by snyft - 2010-09-02, 00:57
[No subject] - by Ebany - 2010-09-03, 18:35
[No subject] - by Ebany - 2010-09-03, 19:11
[No subject] - by xexe - 2010-09-04, 18:51
[No subject] - by zwat - 2010-09-05, 23:13
[No subject] - by Ebany - 2010-09-06, 09:20
[No subject] - by xexe - 2010-09-06, 09:33
[No subject] - by zwat - 2010-09-06, 12:39
Suggestion for 1.9 - by Kringlan - 2010-09-06, 21:25
[No subject] - by xexe - 2010-09-07, 10:09
[No subject] - by Kringlan - 2010-09-07, 22:44
[No subject] - by xexe - 2010-09-08, 15:10
[No subject] - by ZERO <ibis> - 2010-09-09, 09:51
[No subject] - by xexe - 2010-09-09, 11:20
[No subject] - by zwat - 2010-09-09, 20:25
[No subject] - by ZERO <ibis> - 2010-09-09, 21:55
[No subject] - by xexe - 2010-09-10, 08:32
[No subject] - by xexe - 2010-09-10, 08:53
[No subject] - by snyft - 2010-09-11, 14:32
[No subject] - by xexe - 2010-09-12, 00:14
[No subject] - by Kringlan - 2010-09-12, 12:28
[No subject] - by xexe - 2010-09-14, 13:29
[No subject] - by Kringlan - 2010-09-14, 18:03
[No subject] - by xexe - 2010-09-20, 16:38
[No subject] - by buskul - 2010-09-21, 14:35
[No subject] - by xexe - 2010-09-21, 23:00
[No subject] - by zwat - 2010-09-22, 21:26
[No subject] - by xexe - 2010-09-22, 22:04
[No subject] - by kim1406 - 2010-09-23, 10:14
[No subject] - by SoWErA - 2010-09-23, 11:15
[No subject] - by xexe - 2010-09-23, 22:16
[No subject] - by kim1406 - 2010-09-23, 23:57
[No subject] - by xexe - 2010-09-24, 00:45
[No subject] - by Stormin8 - 2010-09-24, 17:56
[No subject] - by kim1406 - 2010-09-24, 20:15
[No subject] - by Marvis - 2010-09-25, 22:57
[No subject] - by xexe - 2010-09-26, 10:52
[No subject] - by xexe - 2010-09-26, 11:38
[No subject] - by snyft - 2010-09-26, 11:48
[No subject] - by xexe - 2010-09-26, 12:03
[No subject] - by snyft - 2010-09-27, 02:21
[No subject] - by xexe - 2010-09-29, 10:55
[No subject] - by snyft - 2010-09-29, 14:47
[No subject] - by xexe - 2010-09-29, 15:05
[No subject] - by snyft - 2010-10-04, 20:17
[No subject] - by zwat - 2010-10-05, 08:53
[No subject] - by xexe - 2010-10-05, 21:48
[No subject] - by xexe - 2010-10-06, 09:29
[No subject] - by snyft - 2010-10-11, 00:00
[No subject] - by xexe - 2010-10-14, 08:37
[No subject] - by anub1s - 2010-10-15, 20:29
[No subject] - by xexe - 2010-10-16, 09:15
[No subject] - by anub1s - 2010-10-16, 12:32
[No subject] - by xexe - 2010-10-16, 18:04
[No subject] - by anub1s - 2010-10-17, 01:53
[No subject] - by xexe - 2010-10-17, 09:07
[No subject] - by xexe - 2010-10-17, 09:54
[No subject] - by anub1s - 2010-10-17, 14:28
[No subject] - by xexe - 2010-10-17, 15:30
[No subject] - by anub1s - 2010-10-17, 18:36
[No subject] - by xexe - 2010-10-17, 19:50
[No subject] - by wookietv - 2010-10-24, 08:55
[No subject] - by xexe - 2010-10-26, 23:45
[No subject] - by valvet - 2010-10-27, 00:50
[No subject] - by xexe - 2010-10-27, 14:26
[No subject] - by xexe - 2010-10-30, 10:50
[No subject] - by Buttink - 2010-10-31, 08:27
[No subject] - by xexe - 2010-11-02, 11:25
[No subject] - by snyft - 2010-11-04, 11:40
[No subject] - by xexe - 2010-11-05, 12:33
[No subject] - by Buttink - 2010-11-07, 00:43
[No subject] - by xexe - 2010-11-08, 10:29
[No subject] - by Buttink - 2010-11-08, 11:08
[No subject] - by xexe - 2010-11-08, 11:15
[No subject] - by Buttink - 2010-11-09, 06:36
[No subject] - by snyft - 2010-11-09, 09:12
[No subject] - by Buttink - 2010-11-09, 10:16
[No subject] - by xexe - 2010-11-09, 11:44
[No subject] - by moeru - 2010-11-13, 16:02
[No subject] - by xexe - 2010-11-13, 18:12
[No subject] - by outleradam - 2010-11-14, 04:28
[No subject] - by Buttink - 2010-11-20, 07:53
[No subject] - by viriiguy - 2010-11-22, 15:53
[No subject] - by xexe - 2010-11-22, 20:32
[No subject] - by xexe - 2010-11-24, 11:52
[No subject] - by xexe - 2010-11-27, 13:18
[No subject] - by moeru - 2010-12-05, 20:08
Frasier season 11 not showing up - by rimster - 2010-12-05, 23:46
[No subject] - by xexe - 2010-12-06, 10:14
[No subject] - by xexe - 2010-12-06, 10:17
[No subject] - by rimster - 2010-12-06, 20:47
[No subject] - by snyft - 2010-12-07, 10:56
[No subject] - by moeru - 2010-12-15, 03:02
[No subject] - by xexe - 2010-12-15, 09:36
[No subject] - by rimster - 2010-12-15, 09:47
append and prepend - by pcvii - 2010-12-20, 18:17
[No subject] - by geearf - 2010-12-27, 09:48
[No subject] - by Tak0r - 2010-12-29, 22:18
[No subject] - by costi - 2011-01-03, 00:09
[No subject] - by josz - 2011-01-03, 11:51
[No subject] - by xexe - 2011-01-18, 17:34
[No subject] - by xexe - 2011-02-12, 01:59
[No subject] - by armadillo - 2011-02-27, 01:40
[No subject] - by josephdebono - 2011-02-27, 17:17
[No subject] - by Deebster - 2011-03-04, 00:31
[No subject] - by SoWErA - 2011-03-14, 04:39
[No subject] - by Utterstrom - 2011-04-16, 01:44
[No subject] - by zmalex - 2011-04-23, 22:43
[No subject] - by Deebster - 2011-04-27, 16:09
[No subject] - by moeru - 2011-04-27, 22:32
Date based shows - by erolosty - 2011-05-08, 17:55
[No subject] - by David91 - 2011-05-13, 18:20
[No subject] - by Jani - 2011-06-02, 10:08
[No subject] - by TechLife - 2011-09-03, 06:20
[No subject] - by jsimmons - 2011-09-04, 18:39
[No subject] - by xexe - 2011-09-05, 11:13
[No subject] - by xexe - 2011-09-05, 11:25
[No subject] - by Benwolf7 - 2011-09-30, 20:34
[No subject] - by dumpydooby - 2011-11-01, 19:12
[No subject] - by Mooorgul - 2011-11-10, 01:08
[No subject] - by dumpydooby - 2011-11-20, 04:21
[No subject] - by Mooorgul - 2011-11-30, 17:53
[No subject] - by jadog - 2011-12-07, 23:54
[No subject] - by bwqbbq - 2011-12-10, 22:48
Netflix crash - by alvychris - 2011-12-20, 04:12
[No subject] - by NEOhidra - 2011-12-28, 19:25
[No subject] - by snyft - 2011-12-29, 01:51
Need some help with regexp - by User 29005 - 2012-01-10, 02:06
regexp wanted - by andzinsan - 2012-01-16, 10:45
[No subject] - by Killerc - 2012-01-17, 23:32
[No subject] - by Sha43Gal - 2012-01-18, 05:53
[No subject] - by LehighBri - 2012-01-23, 04:23
[No subject] - by LehighBri - 2012-01-26, 03:56
[No subject] - by Cupid - 2012-02-03, 20:53
[No subject] - by roth2006 - 2012-02-04, 04:19
[No subject] - by jenskristian - 2012-02-15, 12:00
[No subject] - by j3tang - 2012-02-22, 03:36
[No subject] - by xexe - 2012-03-08, 13:04
RE: - by j3tang - 2012-04-02, 00:48
[No subject] - by xexe - 2012-03-08, 13:07
[No subject] - by xexe - 2012-03-08, 13:09
[No subject] - by MasterCATZ - 2012-03-11, 05:08
RE: Extra REGEX for TV Show Episode matching - by Janrover - 2021-02-23, 08:51
Logout Mark Read Team Forum Stats Members Help
Extra REGEX for TV Show Episode matching19