• 1
  • 2(current)
  • 3
  • 4
  • 5
  • 17
Regular Expressions
#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
Reply
#17
kids.
<AdvancedSetttings> != <advancedsettings>
Reply
#18
Please update this wiki page with your custom regexps: http://www.xboxmediacenter.com/wiki/inde...e=TV_Shows
Reply
#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
Reply
#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
Reply
#21
DonJ Wrote:Please update this wiki page with your custom regexps: http://www.xboxmediacenter.com/wiki/inde...e=TV_Shows

Does anyone want to add an example of how you want things listed here and I will try to add some entries? I am not sure if you want real examples or just something like:

TV Show Name\Season #\TV Show Name - S##E## - Episode Name.avi

Or if you want some of it italicized or what. The above format works if you want to add that in whatever format you would like it in.

Thanks.

J_K_M_A_N
Reply
#22
J_K_M_A_N Wrote:Does anyone want to add an example of how you want things listed here and I will try to add some entries? I am not sure if you want real examples or just something like:

TV Show Name\Season #\TV Show Name - S##E## - Episode Name.avi

Or if you want some of it italicized or what. The above format works if you want to add that in whatever format you would like it in.

Thanks.

J_K_M_A_N

Ok, this is my testing, and I done a lot of testing...

For me it doesn't do recursive scans when you TV shows are actually located on the Xbox (like mine) and all I could get to work was when I put the avi in the root of the Series files like so

\Battlestar Galactica\S03E01 - whatever.avi and that works fine

Then by chance (coz I don;t use SMB normally, I tried it that way and found the following

\Battlestar Galactica\Season 3\Battlestar Galactica.S03E04 - Whatever.avi was being scanned.

Then I started testing regexp... and I had a few problems, but the regexp causing my the least greief is this

season[\._ ]([0-9]+)[\\/]([0-9]+)[^\\/]*

This will pick up the following

\Battlestar Galactica\season 3\01 - test.avi perfectly fine

It doesn't like this example

\Battlestar Galactica\season 3\01 - 33.avi at all

I did some testing, and for some reason it refused to scan a folder called Season 4. It didn't matter whether I used eitehr of the following expressions
Code:
Season[\._ ]([0-9]+)[\\/]([0-9]+)[^\\/]*
[Ss]eason[\._ ]([0-9]+)[\\/]([0-9]+)[^\\/]*
which both past regexp testers.

I did try various things after the episode selction, but it didn't like anything I did.

To be honest I've given up. All my season folders are now named with lower case, and I'm buying a nice new NAS HDD to store all the stuff that was on my xbox (I needed a good excuse for a 1TB drive)

BUT, if any one can suggest something that will work for the following example I would be grateful..

\Battlestar Galactica\Season 1\01 - 33.avi

Love the work, I love it so much I get disappointed when then are no svn updates when I check =)
Reply
#23
Hiya,

First post, but we all got to start somewhere...

I can get my regexp expressions to pick up most of my files regardless of how they are named - with two exceptions. No matter what i put in, i can't get it to pick up the following structure:

Show Name/Season 1/ShowName.101.text.avi

(if its 1x01 or S01E01 then it picks it up no problem, but as soon as you take out a letter it misses it completely)

Show Name/Season 1/1x01 - Episode Title

(I did read spiff's comment that having an episode number first is tricky as it causes confusion with shows like 24, but can anyone provide a regexp for it since i don't actually watch 24!)

Any help would be much appreciated!
Reply
#24
Noticed you can't edit the posts here...

This is currently what my AdvancedSettings.xml looks like...

<tvshowmatching>
<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>[\._ \-]([0-9]+)([0-9][0-9])[\._ \-][^\\/]*</regexp>
<regexp>([0-9]+)([0-9][0-9])[^\\/]*</regexp>
<regexp>([0-9]+)([0-9][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]\-([0-9]*)[^\\/]*</regexp>
<regexp>[\._ \-][0-9]*x[0-9]*[\._ \-]*([0-9]*)x([0-9]*)[^\\/]*</regexp>
</twopart>
</tvshowmatching>

You can see i'm trying to catch every single combination here, but something's slipping through!
Reply
#25
You did add the <advancedsettings> </advancedsettings> tags?

I can't seem to get it to work. I must be doing something small wrong. I do have an old revision of XBMC (which may or may not be the problem)

Here is the contents of my advancedsettings.xml

Code:
<advancedsettings>
<moviestacking append="no">
    <regexp>[ _\.-]+part[ _\.-]*([0-9a-d]+)</regexp>
</moviestacking>
<tvshowmatching>
    <regexp>[Ss]eason ([0-9]+)[\\/]([0-9]+) - [^\\/]*</regexp>
    <twopart>
    </twopart>
</tvshowmatching>
</advancedsettings>

The movies one works fine, but I can't seem to get my tv show matching to work. Once again my tv shows are in the

Tvshowname/Season #/episode# - Episodetitle.extension

I do have it scan recursively and included the <twopart></twopart> tag as you mentioned a problem with earlier revisions.

Any ideas?
Reply
#26
blakholephysics:

try this:
Code:
<regexp>Season ([0-9]+)[\\/]([0-9]+) - .*\.[0-9a-zA-z]+[^\\/]</regexp>
Reply
#27
Ok,

I think i found a bug in XBMC's RegEx engine. I've confirmed with two different regexp programs and websites (http://www.regextester.com), using TextMate on a Mac and Notepad++ on Windows.

Here's the regexp that works in all those but not XBMC (for CERTAIN things):

Code:
([0-9]|[0-9][0-9])([0-9][0-9]) - [^\\/]

This should match all the following below (tested and confirmed on other regexp engines):

101 - Pilot.avi (Season 1, Episode 1)
610 - My Show.avi (Season 6, Episode 10)
1024 - Testing.avi (Season 10, Episode 24)

The values of $1 is the Season number and $2 the episode number. Essentially this regexp finds a series of 3 numbers followed by a dash, gets the last two numbers of the string and sets it as the episode number, the first character or two characters for Season 10+ are set as the Season number and stored in $1.

This works fine, but NOT in XBMC.

It will match the first two, but not the last one.

All my other shows which are named this way did get scanned into the DB except for two:

South Park Season 10
SG-1 Season 10

Test it for yourself.
Reply
#28
Well I feel like an ass.

Carry on. nothing to see in my previous post.

** blushes **
Reply
#29
What does .*\. mean?
literal . but ".*" ?

And did you mean for the last z to be capital in [0-9a-zA-z]?
Reply
#30
. - any char
* any amount that char
? this is optional.
Reply
  • 1
  • 2(current)
  • 3
  • 4
  • 5
  • 17

Logout Mark Read Team Forum Stats Members Help
Regular Expressions1