Kodi Community Forum
Extra REGEX for TV Show Episode matching - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Tips, tricks, and step by step guides (https://forum.kodi.tv/forumdisplay.php?fid=110)
+--- Thread: Extra REGEX for TV Show Episode matching (/showthread.php?tid=51614)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26


- geearf - 2010-12-27

Hey,

I'm using your latest regex and have some stuff not working.

I am running Dharma.

debug log at : http://pastebin.com/avU6nraZ

It does have "DEBUG: could not enumerate file" for certain anime "movies", but for Devil May Cry episodes it does not, yet they do not show in my tv shows in xbmc (the show does but not the episodes).

Any idea what I should look at?

Thanks!


- Tak0r - 2010-12-29

I Made a regex for the anidb default naming scheme of the webclient.

<regexp>(?i)() - ([\d]{1,3}) -</regexp>

This One Matches Files Named like

Major 6th Season - 14 - Responsibility of the Ace - [umai](6a06ba34).mkv

Or More Generic

Series Name - Ep Nr - Ep Title - [Group Short](CRC32)

But anyhow it doesen't work the debug just says can't enumerate file

http://pastebin.com/uDuv4fCR

Edit: Problem fixed ... it had to do with those cleaning regex which disturbed xbmc processing afterwards Sad
Removed the whole tvshows prepend section and now it works like a charm =)


- costi - 2011-01-03

Tak0r Wrote:Edit: Problem fixed ... it had to do with those cleaning regex which disturbed xbmc processing afterwards Sad
Removed the whole tvshows prepend section and now it works like a charm =)

I confirm: commenting out the prepend section makes XBMC suddenly reconize anime files. Before removing that no episodes were found. So it seems something in the prepend section breaks the anidb regexp.

I'm using v2.2 of the file here with no changes.


- josz - 2011-01-03

---EDIT---

Nevermind, got it fixed as it seems! Actually removing the prepend section as mentioned above me did the trick!

---EOF EDIT ---


I'm quite a noob with XBMC and all, so forgive me for doing something dumb.
I downloaded the advancedsettings.xml from the first post but it did not work for me as I'd expect it.

The shows popup in library mode but (at least most of the) episodes do not.

My filenaming convention is as followed;

Single episode:
Quote:\\nas\TVSeries (E)\Band of Brothers\Season 01\01.mkv
OR
Quote:\\nas\TVSeries (E)\Band of Brothers\Season 01\01 - episodename.mkv

Double episodes
Quote:\\nas\TVSeries (E)\Band of Brothers\Season 01\01 & 02.mkv
OR
Quote:\\nas\TVSeries (E)\Band of Brothers\Season 01\01 & 02 - episodename.mkv

There can be spaces around the dash ("-") and around the ampersand ("&").
Any help with this would be awesome!


- xexe - 2011-01-18

V2.3 - 18/01/2011
http://pastebin.com/N5mjtBxk
WARNING: Big changes with little to no testing. Released due to demand. Use at your own risk.
Non critical typos, formatting and spelling.
Anime matches now happen before XBMC. By request.
Tighter CRC test in anime
Added movie stacking. Dont run these if you have a one pile file movie folder. (This is the reason XBMC doesnt do it natively)
Added OpenELEC default CPU and GPU temp settings
Added Samba timeout value
Explicit abc123 was catching pipes as well
Can move to \D instead of [^\d] etc. We have had proper PCRE for a long while now.
Stick on \d{1,2} rather than a mix with \d\d?
Now handles S1, S01, S 1, S 01 as well as Season1, Season01, Season 1, Season 01 directorys



Big thanks to Savi on IRC for pointing out some method mismatches and other bugs.

This is a relatively big change and it is all but untested due to my continued work pressures. Please test and feedback.


24.S08E20.EXTENDED.720p.BluRay.X264-WASABi - MidKnight - 2011-02-07

any help with getting this to work when .EXTENDED. is part of the name?


- xexe - 2011-02-12

MidKnight Wrote:any help with getting this to work when .EXTENDED. is part of the name?

See first post for how to ask for help in a way you can actually get some Smile


- armadillo - 2011-02-27

Hi, I'm running the complete V2.3 - 18/01/2011 regex and it helps me find most of my TV/anime without problems.

There are however a couple that don't get picked up.

I'm on the latest stable XBMC release (10.0).

My log: http://pastebin.com/swuwgzsh

Thanks for what you're doing! Nod


- josephdebono - 2011-02-27

Hi!

I'm running version 2.3 and I seem to have some trouble capturing TV shows. It almost seems like the append action regexes aren't working at all for me.

Trying to capture WWII in HD with filenames containing part.##

http://pastebin.com/sX8tAt9e

I tested the following regex on one of my file path and it got captured correctly in Espresso.
(?i)[/\\](?Confused|season)\W?(\d{1,2})\D*[/\\].*?\Wpart\W?(\d{1,2})\W([^/\\]*)

Edit2:

So something is really strange on my setup. Running W7x64 as you can see from the log above. I've always had a sneaking suspicion that the regexes weren't working correctly so what I've done is I've replicated folders and files from the comments in the file such that I had exactly the following structure
Code:
/NASA Missions/Season 1/nasa.missions.part.3.hdtv.xvid-fqm.avi
/The Chronicles/Season 1/Chronicles.Of.01.The.episode.6.DVDRip.DivX-movies.avi
The files were still not enumerated. I did this late last night and haven't got the logs yet but I'll upload them as soon as I get home from work.
Help would greatly be appreciated since this is driving me crazy.


- Deebster - 2011-03-04

I'm very comfortable with regexes but I'm not having any luck here.

I've simplified one of the rules and got:
Code:
s(\d{1,2})/.*\Wep0?(\d{1,2})\W([^/]*)

However, I still see
DEBUG: VideoInfoScanner: Could not enumerate file /files/tv/How TV Ruined Your Life/s01/How TV Ruined Your Life ep01 Fear.WnA.avi

The regex matches the string (although this version doesn't have the initial slash). Does the regex match the whole path or does it do ^regex$ on the path after the episode folder?

(Full log is http://pastebin.com/0MFavVwy)

Thanks in advance


- SoWErA - 2011-03-14

here is my Debug Log plz have a look why it's not adding 8e01 8e02 8e03 8e22 and specials 3 and 4 of That 70s show - says something about enumerating.

http://pastebin.com/Vfs8kdHH


- Utterstrom - 2011-04-16

Big thanks!
Been having problems with my shows for weeks now, mostly because I didn't think there was a solution to it.

Now all the shows were the releasegroup put their name first gets added automatically!

e.i tpz-30rock303.r00 -> .r11(.rar)

Thanks again!


- zmalex - 2011-04-23

I could need some help with regexp for the following setup:

\\NAS\media\TVseries\The Wire\Season 1\The Wire Season 1 Episode 01 - The Target.avi

I have two series like this. Sure I could rename them to SxxExx but that would be giving up Smile

Edit1 : I tried
Season (\d{1,2}) Episode (\d{1,2})(.*)
Season ([0-9]+) Episode ([0-9]+)[^\\/]*

Edit2: Ok I read the "Do not ask for random regexp help" on the first page. So could i rephrase to making it a request to handle the above syntax? I checked your existing regexp examples and couldn't find a regexp looks as it would be helpful for the above case.


- Deebster - 2011-04-27

Deebster Wrote:I'm very comfortable with regexes but I'm not having any luck here.

I've simplified one of the rules and got:
Code:
s(\d{1,2})/.*\Wep0?(\d{1,2})\W([^/]*)

However, I still see
DEBUG: VideoInfoScanner: Could not enumerate file /files/tv/How TV Ruined Your Life/s01/How TV Ruined Your Life ep01 Fear.WnA.avi

The regex matches the string (although this version doesn't have the initial slash). Does the regex match the whole path or does it do ^regex$ on the path after the episode folder?

(Full log is http://pastebin.com/0MFavVwy)

Thanks in advance

Having looked at the source I see that the regex does operate on the full path.

More usefully, I have found that on my system* I cannot use \W. Replacing \W with [^\w] makes things work.

[Edit]Looking at the log, it seems that the file and the regex are converted to lower case, so \W and \w (and \D and \d, etc) are identical.

Eg:

Code:
<regexp>(?:ep?|pa?r?t)[\._ \-]?(\D+)[^\d]</regexp>
shouldn't work (because of the \D in the brackets), but it does:
Code:
DEBUG: VideoInfoScanner: Found episode match /files/tv/10 minute tales/10 minute tales e01.avi (s1e1) [(?:ep?|pa?r?t)[\._ \-]?(\d+)[^\d]]

Seems like a bug to me...


* Linux (Ubuntu 10.04.2 LTS, 2.6.32-26-generic i686). Built on Mar 9 2011 (Git:Unknown) installed from LiveCD


- moeru - 2011-04-27

armadillo Wrote:Hi, I'm running the complete V2.3 - 18/01/2011 regex and it helps me find most of my TV/anime without problems.

There are however a couple that don't get picked up.

I'm on the latest stable XBMC release (10.0).

My log: http://pastebin.com/swuwgzsh

Thanks for what you're doing! Nod

What might be a huge help is to use http://www.anidb.net

they have a renamer that works with this regexp

also: Is anyone having trouble getting shows with numbers in them to register using 2.3 of xexe's file? Shows like Ranma 1/2 (filename is listed as Ranma 12) or Gundam 00 do not show up in the library but nothing appears as failing in the logs when you try to add them to the library.
All I get is in the debug log: http://pastebin.com/9MScb6pW

I ran the refresh on the files in question @ 20:07 in the log