Posts: 21
Joined: Dec 2009
Reputation:
0
mbeyer
Junior Member
Posts: 21
Hi guys,
I have little problem with my regexps.
I have some tvshows that have two episodes aired as one, and as such, I use one file for them. However, xbmc shows it to me only as one episode.
I use the following naming format (example):
MyShow/Season 1/01 02 - Pilot.avi
I use this regexps to match it:
<regexp>([0-9]+)/([0-9]+)( [0-9]+)?</regexp>
How can i get XBMC to list this file as episodes 1 and 2, not only as 1?
Thanks,
Markus
Posts: 7,172
Joined: Dec 2003
Reputation:
4
kraqh3d
Retired Developer
Posts: 7,172
You cant change the multipart regexp. It's embedded in the code. Just rename the file to be MyShow/Season 1/01-02 - Pilot.avi. (There's more possibilities if you didn't have just numbers btw).
And then add a custom regexp like this. (I think this will work.)
<regexp>s(?:eason)?[ \.-]([0-9]+)[\\\/]([0-9]+)([^\\\/]+)$</regexp>
I loosened it up a bit for you to allow more variation for the season identifier in the parent folder, and allow for both slash types
Posts: 12,706
Joined: Nov 2003
Reputation:
129
spiff
Team-Kodi Member
Posts: 12,706
as it says, the third part should select the renaming part of the filename. this is then fed into the engine. so there's nothing claiming you can change how the matching on that part is performed.
i've contemplated adding it, but it really doesn't make much sense to be all that configurable. we should probably allow spaces as a separator through.
Posts: 7,172
Joined: Dec 2003
Reputation:
4
kraqh3d
Retired Developer
Posts: 7,172
Yeah, that means the third parens set which is the remainer of the filename, gets parsed again to check for a multi-episode file. That's the ([^\\\/]+)$ bit above. (You prolly noticed there's actually four parens bits above, but whatever is in a parens like (?:foo) is not "saved".)