regexp problem with multipart tv shows
#1
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
Reply
#2
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
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#3
kraqh3d Wrote: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.

That works so far, thanks.
I wander why it says "NOTE: for multi-episode matching to work, there needs to be a third set of parentheses on the end. This part is fed back into the regexp engine. " in the wiki though if you can't change that behavior.
Reply
#4
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.
Reply
#5
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".)
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply

Logout Mark Read Team Forum Stats Members Help
regexp problem with multipart tv shows0