Regular Expressions

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
J_K_M_A_N Offline
Fan
Posts: 443
Joined: Feb 2006
Reputation: 1
Location: Minnesota
Post: #11
Here is an example: (I know it is not a good way to name my files but it is because I watch them on the computer also and it just looks neater. I am a neat freak. What can I say?)

Studio 60 On The Sunset Strip\Season 1\Studio 60 On The Sunset Strip - Season 1 - Episode 04 - The West Coast Delay.avi

I think one of the problems is the Season 1 directory. I have tried the following expressions:

<regexp>[\._ \-][Season ]([0-9])[\-]?[Episode ]([0-9]*)[^\\/]*</regexp>
<regexp>[\._ \-] Season ([0-9]*)[\-] Episode ([0-9][0-9])[\._ \-][^\\/]*</regexp>
<regexp>[\-]Season ([0-9]+) - Episode ([0-9]+)[^\\/]*</regexp>
<regexp>[\._ \-]*Season([0-9]+)*Episode([0-9]+)*[^\\/]*</regexp>
<regexp>[\\/][\-][Season]([0-9]+)[\-][Episode]([0-9][0-9])[^\\/]*</regexp>

Plus a few others that I overwrote. And I tried yours jmarshall. That didn't work either. Again, I think it is the Season 1 directory before the files but I am not sure.

J_K_M_A_N (You get used to typing that. Smile )
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 24,523
Joined: Oct 2003
Reputation: 138
Post: #12
Season ([0-9]+) - Episode ([0-9]+)

will catch that file. No need to make it more complicated than that.

I used http://www.regextester.com to confirm.

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
J_K_M_A_N Offline
Fan
Posts: 443
Joined: Feb 2006
Reputation: 1
Location: Minnesota
Post: #13
I am losing my mind! Now my xbox won't boot if I have an advancedsettings.xml file on it with the <tvshowmatching> entries in it. This is the EXACT contents on my advancedsettings.xml file:

<AdvancedSettings>
<displayremotecodes>true</displayremotecodes>
<tvshowmatching>
<regexp>Season ([0-9]+) - Episode ([0-9]+)</regexp>
</tvshowmatching>
</AdvancedSettings>

If I ONLY have displayremotecodes in it it works fine. When I add <tvshowmatching>, it hangs.

I don't have a debug log because it doesn't make it that far. This is all I get:

18:40:51 M: 52211712 NOTICE: -----------------------------------------------------------------------
18:40:51 M: 52191232 NOTICE: Starting XBoxMediaCenter. Built on Mar 18 2007
18:40:51 M: 52191232 NOTICE: Q is mapped to: Harddisk0\Partition1\XBMC
18:40:51 M: 52191232 NOTICE: Log File is located: Q:\xbmc.log
18:40:51 M: 52191232 NOTICE: -----------------------------------------------------------------------
18:40:51 M: 52191232 NOTICE: Setup DirectX
18:40:52 M: 52146176 NOTICE: load settings...
18:40:52 M: 52146176 NOTICE: loading T:\guisettings.xml
18:40:52 M: 52019200 NOTICE: Getting hardware information now...
18:40:52 M: 52019200 NOTICE: Checking resolution 10
18:40:52 M: 52019200 NOTICE: Setting autoresolution mode 4

I have to quit for now. I am going crazy. Sorry to have wasted all your time. If I get it working I will DEFINITELY update the wiki. Thanks so much for the help.

J_K_M_A_N
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 24,523
Joined: Oct 2003
Reputation: 138
Post: #14
You must have the <twopart> tag present due to a bug (that has been fixed).

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
J_K_M_A_N Offline
Fan
Posts: 443
Joined: Feb 2006
Reputation: 1
Location: Minnesota
Post: #15
THANK YOU!

I will try again.

J_K_M_A_N
find quote
J_K_M_A_N Offline
Fan
Posts: 443
Joined: Feb 2006
Reputation: 1
Location: Minnesota
Post: #16
Well, I keep trying and I keep failing! You can see my advancedsettings.xml above but it still doesn't find info for the files. I renamed the first two episodes like so:

Studio 60 On The Sunset Strip - S01E01 - Pilot Episode.avi
Studio 60 On The Sunset Strip - S01E02 - The Cold Open.avi

The rest are as follows:

Studio 60 On The Sunset Strip - Season 1 - Episode 03 - The Focus Group.avi
Studio 60 On The Sunset Strip - Season 1 - Episode 04 - The West Coast Delay.avi
Studio 60 On The Sunset Strip - Season 1 - Episode 05 - The Long Lead Story.avi

Etc..etc..etc

Those files are in the directory:
Studio 60 On The Sunset Strip\Season 1\^The above files^

While on that main directory I am pressing the white button and scanning for new content. It gets info for the first two files that I changed but not any of the others. I am at the end of my rope. I am about to rename all my files but I would like to help at least a little by (having you guys Blush ) figure this out. I really don't know what else to try.

If it can't work the way I have it, I will rename but it should work I would think. I am just missing something. Again, sorry to bug you guys.

J_K_M_A_N
find quote
spiff Online
Grumpy Bastard Developer
Posts: 12,179
Joined: Nov 2003
Reputation: 82
Post: #17
kids.
<AdvancedSetttings> != <advancedsettings>

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
DonJ Online
Team-XBMC Member
Posts: 490
Joined: May 2005
Reputation: 5
Post: #18
Please update this wiki page with your custom regexps: http://www.xboxmediacenter.com/wiki/inde...e=TV_Shows
find quote
J_K_M_A_N Offline
Fan
Posts: 443
Joined: Feb 2006
Reputation: 1
Location: Minnesota
Post: #19
spiff Wrote:kids.
<AdvancedSetttings> != <advancedsettings>

Are you talking about the filename or the tags? Because the displayremotecodes works as is with the <AdvancedSettings> tag. That is the reason I put that in there. So I would know if it was reading the advancedsettings.xml file or not.

I have tomorrow off so I will work on it then and see what I come up with. When I get it, I will update the wiki...both parts.

J_K_M_A_N
find quote
J_K_M_A_N Offline
Fan
Posts: 443
Joined: Feb 2006
Reputation: 1
Location: Minnesota
Post: #20
Well, I got the newest version today and tried again. Still no luck. Has anyone gotten a regexp to work when used from the advancedsettings.xml file? I can't get ANY to work. I tried the following:

advancedsettings.xml file contents:
Code:
<advancedsettings>

   <displayremotecodes>true</displayremotecodes>
  
   <tvshowmatching>
     <regexp>Season ([0-9]+) - Episode ([0-9]+)[^\\/]*</regexp>
     <regexp>Season ([0-9]+)[\\/]Episode ([0-9]+)[^\\/]*</regexp>
   </tvshowmatching>
  
</advancedsettings>

Tried to use those on these files...

Lost\Season 1\Episode 01 - Pilot.avi

and

Studio 60 On The Sunset Strip\Season 1\Studio 60 On The Sunset Strip - Season 1 - Episode 03 - The Focus Group.avi

I also renamed two other studio 60 files like so:

Studio 60 On The Sunset Strip\Season 1\Studio 60 On The Sunset Strip - S01E01 - Pilot.avi

and those are found. It almost seems like it is not using the advancedsettings.xml entries to search. Both of those expressions are found in the online tests so I don't know what else could be wrong.

So please post if you have any files that aren't found without adding a regexp in the advancedsettings.xml file and what the regexp is and how the file is named. Thanks.

J_K_M_A_N
find quote
Post Reply