Regular Expressions

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
NProszkow Offline
Junior Member
Posts: 3
Joined: Apr 2007
Reputation: 0
Post: #46
OK.. I must be an idiot..

I am downloading my TV shows via RSS torrents.

I have them all separated by folders on my network share.

ex:
computer/D/TV/24

I have made an advancedsettings.xml file and have placed it in /C/UserData/ with the following info:

<advancedsettings>
<tvshowmatching>
<regexp>.*[Ss]([0-9]*).*[Ee]([0-9]*).*</regexp> % *.s01.*e01.*
<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>

I have set that "TV" folder's SET CONTENT to TV Shows (TV.com)

all of the files I download are in the file format:

show.s01e01.res.source.ripgroup.avi

ex:
24.S06E19.HR.HDTV.XviD-CTU.avi

When I try TV Show information it just brings up the Enter TV Show Name window over and over. Scan for new content does something quickly (can't read it) then nothing.

What am I missing?! Thanks to whomever has the time to help.
find quote
spiff Offline
Retired Developer
Posts: 12,386
Joined: Nov 2003
Post: #47
your advancedsettings.xml is broken - % is certainly no valid comment. that's one issue.

but why keep guessing? enable debug logging and see for yourself whats going on.
find quote
mots Offline
Senior Member
Posts: 171
Joined: Apr 2007
Reputation: 0
Location: Austria
Post: #48
Hi, could you help me with my Prob?

That's what my shows' format looks like:
smb:\\10.0.0.2\Xbox\Series\Family Guy\Season 4\01- Peter Peter Caviar Eater.avi

(smb:\\10.0.0.2\Xbox\Series is mounted in XBMC and this is where i try to build a database from)

my advancedsettings.xml looks like this:
Code:
<tvshowmatching append="yes">
    <regexp>Season[\._ ]([0-9]+)[\\/]([0-9]+)[^\\/]*</regexp>
    <regexp>Season([0-9]+)[\\/]([0-9]+)[^\\/]*</regexp>
</tvshowmatching>

It seems to find a few shows, but it only shows the shows' names, not the seasons/episodes.
Help?
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 26,181
Joined: Oct 2003
Reputation: 176
Post: #49
You are missing <advancedsettings>

Please, please indicate how we can make this more obvious in the online manual!

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.


[Image: badge.gif]
find quote
mots Offline
Senior Member
Posts: 171
Joined: Apr 2007
Reputation: 0
Location: Austria
Post: #50
jmarshall Wrote:You are missing <advancedsettings>

Please, please indicate how we can make this more obvious in the online manual!

Thanks, worked fine now.
BUT: It doesn't find two (imo quite important) shows:
M.A.S.H and Hogan's Heroes (thats what their dirs are called)
any ideas?
find quote
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
Donor
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
Retired Developer
Posts: 12,386
Joined: Nov 2003
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.
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: 662
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
Retired Developer
Posts: 12,386
Joined: Nov 2003
Post: #57
that's the idea...
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: 662
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