Regular Expressions

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
JMoore Offline
Junior Member
Posts: 5
Joined: Apr 2007
Reputation: 0
Post: #51
Hey I'm new to XBMC, and am having difficulty with this. My file structure is:
.../Family Guy/Season 1/1x01 - Death Has A Shadow.avi

I have made an AdvancedSettings.xml file as follows according to the wiki:
Code:
<advancedsettings>
    <tvshowmatching>
    <regexp>([0-9]+)x([0-9]+)[^\\/]*</regexp>
    </tvshowmatching>
</advancedsettings>

If anyone could give me some guidance as to where I have gone wrong it would be greatly appreciated. Thanks in advance...
find quote
J_K_M_A_N Offline
Fan
Posts: 443
Joined: Feb 2006
Reputation: 1
Location: Minnesota
Post: #52
What version of XBMC are you running? It needs to be one of the newer builds (8344 or better??). There was a problem in the older versions that didn't seem to work with the advanced settings entries.

Other than that, it seems ok to me (but that isn't saying much).

J_K_M_A_N
find quote
spiff Offline
Grumpy Bastard Developer
Posts: 12,187
Joined: Nov 2003
Reputation: 82
Post: #53
that part is just fine.

now tell us the other stuff so we actually can help. such as a debug log of you doing a scan. version of xbmc and so on.

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.
find quote
NProszkow Offline
Junior Member
Posts: 3
Joined: Apr 2007
Reputation: 0
Post: #54
OK, I have all my episodes getting info via TV.com except for the Colbert Report. I have looked for a good regexp and can't seem to find one for a daily program with the format:

name.month.day.year.avi

I am sure I am missing a post somewhere...

Thanks again!
find quote
szsori Offline
TheTVDB.com Admin
Posts: 663
Joined: Aug 2006
Reputation: 1
Location: Milwaukee, WI
Post: #55
Easiest solution... rename your Colbert Report episodes to match the numbering on my site or tv.com. Then it's SxxExx.

http://www.thetvdb.com/?tab=series&id=79274&lid=7
find quote
JMoore Offline
Junior Member
Posts: 5
Joined: Apr 2007
Reputation: 0
Post: #56
Hey thanks for the replies, I got it sorted I wasn't scanning them properly. Just out of interest, if I wanted to add another TV show with different file name structure do I just add another regexp line to tvshowmatching?
find quote
spiff Offline
Grumpy Bastard Developer
Posts: 12,187
Joined: Nov 2003
Reputation: 82
Post: #57
that's the idea...

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.
find quote
JMoore Offline
Junior Member
Posts: 5
Joined: Apr 2007
Reputation: 0
Post: #58
Thanks for your help, sorry I'm just learning.
find quote
NProszkow Offline
Junior Member
Posts: 3
Joined: Apr 2007
Reputation: 0
Post: #59
Thanks szsori. It is pulling up Colbert, but I don't have a regexp for a;

SxxExxx (3 digits)

show. I added another [0-9], but it seems to only be catching the first 2 digits..

<advancedsettings>
<tvshowmatching append="yes">
<regexp>.*[Ss]([0-9]*).*[Ee]([0-9]*).*</regexp>
!!This one --> <regexp>.*[Ss]([0-9]*).*[Ee]([0-9][0-9]*).*</regexp>
<regexp>\[[Ss]([0-9]*)\]_\[[Ee]([0-9]*)[^\\/]*</regexp>
<regexp>[\._ \-]([0-9]*)x([0-9]*)[^\\/]*</regexp>
<regexp>[\._ \-][Ss]([0-9]*)[\.\-]?[Ee]([0-9]*)[^\\/]*</regexp>
<regexp>[\._ \-]([0-9]*)([0-9][0-9])[\._ \-][^\\/]*</regexp>
<regexp>[\\/][Ss]([0-9]+)[Ee]([0-9])+</regexp>
<regexp>[\._ \-][Ss]([0-9]+)[\.\-][Ee]([0-9]+)[^\\/]*</regexp>
<twopart>
<regexp>\[[Ss]([0-9]*)\]_\[[Ee][0-9][0-9]\-([0-9]*)\][^\\/]*</regexp>
<regexp>[\._ \-][Ss]([0-9]*)[^0-9]*[Ee]([0-9][0-9])[^\\/]*</regexp>
<regexp>[\._ \-][Ss]([0-9]*)[^0-9]*[Ee][0-9][0-9]\-([0-9]*)[^\\/]*</regexp>
<regexp>[\._ \-][0-9]*x[0-9]*[\._ \-]*([0-9]*)x([0-9]*)[^\\/]*</regexp>
</twopart>
</tvshowmatching>
</advancedsettings>

Thanks again
find quote
szsori Offline
TheTVDB.com Admin
Posts: 663
Joined: Aug 2006
Reputation: 1
Location: Milwaukee, WI
Post: #60
NProszkow Wrote:<regexp>.*[Ss]([0-9]*).*[Ee]([0-9][0-9]*).*</regexp>

Hmm... I'm not sure how the scraper engine works, but the first regex will match the 3 digit episode as well, just ignoring the final digit. Spiff, perhaps you can shine some light on that? Perhaps it would be better to just change the first one to be:
Code:
<regexp>.*[Ss]([0-9]*).*[Ee]([0-9]{2,4}).*</regexp>
I'm not sure if the XBMC scraper can handle the {x,y} notation, but that would catch episode numbers with 2-4 digits. Alternatively, it could just be:
Code:
<regexp>.*[Ss]([0-9]*).*[Ee]([0-9][0-9]+).*</regexp>
That would catch at least 2 episode digits with no upper limit on the number of digits.
Also, is the [0-9]* in the season part a bug? Don't you want a + to require at least 1 digit?
find quote
Post Reply