Win Help with regex for multiepisodes
#1
Hi,

I am having trouble getting Kodi to recognize multiepisodes.

My naming scheme is \Show name\Season ## (Source)\## - Episode.ext

Example: \Parks and Recreation\Season 7 (TV Rip)\11 - Two Funerals.mkv

I am using the following regex in advancedsettings, which seems to works fine for single episodes:
Code:
Season[\._ ]([0-9]+)[^0-9]*[\\/]([0-9]+)([^\\/]*)$

However, when it comes to double episodes, example \Parks and Recreation\Season 7 (TV Rip)\12-13 - The Final Trip.mkv, Kodi still treats it as a single episode, namely episode 12. I have played around with tvmultipartmatching but can't get it to work. Can anyone help me figure out the correct regex for this?
Reply
#2
Did you ever figure this out? I'm not very good with regex either. In fact I've just now figured out how to do non-capturing groups.
My naming scheme is \Show name\Season ## (year possibly)\##. Episode.ext

Similar to you, my regex is working fine for single episodes:
Code:
Season[\._ ]([0-9]+)(?: \((?:[0-9]{4})\))?[\\/]([0-9]+)([^\\/]*)$

However, I've run into a few places where I have something like:
\Show name\Season 2\25 & 26. Episode Name Part 1 & 2.mp4

I am a bit confused after reading through the wiki. It says:
"For multi-episode matching to work, there needs to be a third set of parentheses '()' at the end, this part is fed back into the regexp engine."

Does this mean we want 4 groups then and I literally just put a "() " at the end of my regex? Obviously the tvmultipartmatching regex will need to be modified but I can't figure out where/what it is run against.
Reply
#3
I'm pretty sure the Wiki (see section 2.2) explains how to do multiple episodes in a single file.
http://kodi.wiki/view/Naming_video_files/TV_shows


For Example:
\Show name\S01E11-E12 - episode.ext

Your example:
\Parks and Recreation\Season 7 (TV Rip)\11 - Two Funerals.mkv

Might have issues because of the (TV Rip), as this is not a normal naming convention within XBMC\Kodi.
Reply
#4
(2015-02-27, 18:15)|Olly| Wrote: However, when it comes to double episodes, example \Parks and Recreation\Season 7 (TV Rip)\12-13 - The Final Trip.mkv, Kodi still treats it as a single episode, namely episode 12. I have played around with tvmultipartmatching but can't get it to work. Can anyone help me figure out the correct regex for this?

S07E12-E13 or 7x12x13 would both totally work here. I don't see why you think a new rational expression would be needed.
Reply

Logout Mark Read Team Forum Stats Members Help
Help with regex for multiepisodes0