View Full Version : Regular Expressions
blakholephysics
2007-03-20, 20:51
It seems like I'm missing something but I'm having trouble with the regular expressions. I don't understand how to modify them.
Could someone explain some of this to me?
<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>
<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>
Specifically, I format my tv shows with /tvshowname/season#/episode# - episodetitle.extension
And I'm not sure how to modify this part of the advanced settings to do that.
first, there was a bug in svn that i fixed @ rev 8255.
second;
a regexp for your scheme would be:
season([0-9]+)[\\/]episode([0-9]+)[^\\/]*
now, the explanation (man, i'm patient today):
the season part should be explanatory; we need it to say 'season' at the start of of pattern. then we need 1 or more numbers. we state that we only allow numbers by the [0-9] part. this defines a list of allowed characters - 0-9 is expanded into 0 1 2 3 4 5 6 7 8 9. we say that we need one of more this using the + sign. now, since this is the season number and that's what we are after, we select this part. this is done by embracing it in parantheses - ([0-9]+). now we need either a backslash or a slash. since a backslash has a special meaning in regular expressions we tell the parser that we mean a litteral \ by doing \\. then it needs episode literally, and we do the same thing to select the episode number. finally we want to make sure we match at the end of the path and not in the middle of it. we do that by specifying a list of not allowed characters, namely \ and /. this we do by putting a ^ inside the []'s, inverting the meaning of the list. finally we need 0 or more of these non-slash characters, which we indicate by a *.
jmarshall
2007-03-21, 01:26
Send that man a beer (hell - a whole crate for that effort :)
J_K_M_A_N
2007-03-21, 14:55
Wow spiff. That was VERY helpful. Thank you for being patient today. I may actually be able to work mine out now.
If I figure that out, maybe I can figure out how to change the wiki. I will do my best to make you proud.
J_K_M_A_N
blakholephysics
2007-03-21, 22:45
That explanation is great. (we really do need something like that in the wiki)
I'm trying to read these expressions and looking at the first expression listed in the wiki:
\[[Ss]([0-9]*)\]_\[[Ee]([0-9]*)[^\\/]*
Why a backslash in the beginning? (does it indicate a literal "[" and then later a literal "]"?)
Why the underscore?
Why Ss and Ee? I thought that they were case insensitive.
[\._ \-]([0-9]*)x([0-9]*)[^\\/]*
Why two backslashes in the first segment? [\._ \-]
Now with what I am trying to do: season #\# - Episodetitle.extension
would This be the correct expression?
season ([0-9]+)[\\/]([0-9]+) - [^\\/]
\[ means a literal [
[Ss] means a capital S or a small s.
\] means a literal ]
_ means underscore
[Ee] means E or e
regular expressions are not case insensitive
[\._ \-] means literal . or underscore or literal -
Your regular expression looks ok to me.
J_K_M_A_N
2007-03-22, 01:07
Man I feel like a complete MORON! I have my files like so:
Series Name\Season #\Series Name - Season # - Episode ## - Episode Name.avi
I thought the expression I would want would be:
[\\/][\-][Season]([0-9]+)[\-][Episode]([0-9][0-9])[^\\/]*
But that doesn't work. I am taking the season number from the file name. Should I take it from the directory instead? Can anyone give me a clue?
J_K_M_A_N
(sorry spiff :sad: )
Series Name\Season #\Series Name - Season # - Episode ## - Episode Name.avi
I thought the expression I would want would be:
[\\/][\-][Season]([0-9]+)[\-][Episode]([0-9][0-9])[^\\/]*
But that doesn't work. I am taking the season number from the file name. Should I take it from the directory instead? Can anyone give me a clue?
Can you give an example filename and path? It's hard to tell which of the following you have:
Lost\1\Lost - 1 - 01 - Pilot.avi
Lost\Season 1\Lost - Season 1 - Episode 01 - Pilot.avi
With an example we can be sure we give you exactly what you need.
you're missing the spaces...
plus you're saying that your pattern should start with a \ or a /, inconsistent with the seriesname part of your example.
jmarshall
2007-03-22, 01:34
J_K_M_A_N (man that's hard to type :p)
You are wanting to match:
\Series Name - Season # - Episode ## - Episode Name.avi
Assuming your spacing includes those spaces, you need the "Season " then you need the number, then " - Episode " then the number:
Season ([0-9]+) - Episode ([0-9]+)[^\\/]*
You don't care what's after the Episode number, except that you don't want a slash as it has to be in the filename.
I'm sure you can mod it to include/not include spaces as necessary.
And please: Add to the wiki with your example regexp, the names it matches, and your explanation on how it works.
Cheers,
Jonathan
J_K_M_A_N
2007-03-22, 02:57
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. :) )
jmarshall
2007-03-22, 03:08
Season ([0-9]+) - Episode ([0-9]+)
will catch that file. No need to make it more complicated than that.
I used www.regextester.com to confirm.
J_K_M_A_N
2007-03-22, 03:45
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
jmarshall
2007-03-22, 04:01
You must have the <twopart> tag present due to a bug (that has been fixed).
J_K_M_A_N
2007-03-22, 04:02
THANK YOU!
I will try again.
J_K_M_A_N
J_K_M_A_N
2007-03-22, 04:18
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
kids.
<AdvancedSetttings> != <advancedsettings>
Please update this wiki page with your custom regexps: http://www.xboxmediacenter.com/wiki/index.php?title=TV_Shows
J_K_M_A_N
2007-03-22, 13:54
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
J_K_M_A_N
2007-03-24, 22:02
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:
<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
J_K_M_A_N
2007-03-24, 22:10
Please update this wiki page with your custom regexps: http://www.xboxmediacenter.com/wiki/index.php?title=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
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
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 =)
cockbongo
2007-03-26, 00:24
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!
cockbongo
2007-03-26, 02:11
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!
blakholephysics
2007-03-27, 02:16
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
<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?
blakholephysics:
try this:
<regexp>Season ([0-9]+)[\\/]([0-9]+) - .*\.[0-9a-zA-z]+[^\\/]</regexp>
Ok,
I think i found a bug in XBMC's RegEx engine. I've confirmed with two different regexp programs and websites (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):
([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.
Well I feel like an ass.
Carry on. nothing to see in my previous post.
** blushes **
blakholephysics
2007-03-27, 06:49
What does .*\. mean?
literal . but ".*" ?
And did you mean for the last z to be capital in [0-9a-zA-z]?
. - any char
* any amount that char
? this is optional.
blakholephysics:
Yes, I did mean a capital Z.. ie: [0-9a-zA-Z]
The regexp is just a tad more specific than it needs to be. You could probably cut it off earlier. I did test it like that and it seems to be working.
Crap, can't edit the post.
One thing I did want to mention about regexp when scanning into your Library (for TV Shows, Movies, anything using a scraper). Make sure it's being detected by that scraper otherwise your regexp could be fine, but if the show isn't being detected on TV.com or IMDB, it won't really work.
That was my issue with a directory "Stargate SG-1", for some reason, it wasn't detecting it on TV.com (I had to manually add it), once that was done, the shows were detected without issue using my original Regexp (boy do I feel stupid having posted that rant a few posts above this one).
Oh well, live and learn.
well, to make you feel slightly better.
there sure are bugs and limitation in our regexp parser. the most irritating being the lack of nongreedy support :/
blakholephysics
2007-03-29, 02:36
The main shows that I'm trying are "Lost", "The Office", and "Heroes"
A plot summary does come up but it lacks any episodes...
Well, I guess I'll wait until the next tech build and try it over again.
Thanks for the help though.
And as it stands, I think that a website mentioned earlier - http://www.regextester.com/ - should be included in the wiki
majestix
2007-03-29, 13:23
Running XBMC-SVN_2007-03-23_rev8306-T3CH-PROPER with the following settings, I have noticed the following:
AdvancedSettings.xml contents:
<advancedsettings>
<tvshowmatching>
<regexp>[Ss](\d+)[Ee](\d+)</regexp>
</tvshowmatching>
</advancedsettings>
Directory Structur and Naming Convention
F:\Videos\Family Guy\Season 1\S01E01 Death Has a Shadow.avi
F:\Videos\Family Guy\Season 1\S01E02 I Never Met the Dead Man.avi
F:\Videos\Family Guy\Season 1\S01E03 Chitty Chitty Death Bang.avi
F:\Videos\Family Guy\Season 1\S01E04 Mind Over Murder.avi
F:\Videos\Family Guy\Season 1\S01E05 A Hero Sits Next Door.avi
F:\Videos\Family Guy\Season 1\S01E06 The Son Also Draws.avi
F:\Videos\Family Guy\Season 1\S01E07 Brian Portrait of a Dog.avi
F:\Videos\Family Guy\Season 2\S02E01 Peter Peter Caviar Eater.avi
F:\Videos\Family Guy\Season 2\S02E02 Holy Crap.avi
F:\Videos\Family Guy\Season 2\S02E03 DaBoom.avi
etc....
OR
F:\Videos\Family Guy\Season\S01E01 Death Has a Shadow.avi
F:\Videos\Family Guy\Season\S01E02 I Never Met the Dead Man.avi
etc...
Program 'Family Guy' is entered into library but does NOT find ANY episodes and import them into the Library
Change Directory Structuer to:
F:\Videos\Family Guy\01E07 Brian Portrait of a Dog.avi
OR
F:\Videos\Family Guy\Stuff 1\S01E07 Brian Portrait of a Dog.avi
F:\Videos\Family Guy\Stuff 2\S02E01 Peter Peter Caviar Eater.avi
Episodes in root of 'Family Guy' directory as well as 'Stuff 1' and 'Stuff 2' directories are entered into Library
Any time I have the word 'Season' In the directory name the files are skipped. Not sure if this is an issue with my RegEXP or a bug in XBMC Any Thoughts?
Interesting Side Note:
Directory Structure
F:\Videos\Family Guy\The Simpsons\S01E01 Death Has a Shadow.avi
VIA 'Set Content' run on the 'Videos' or 'Family Guy' directory all episodes in F:\Videos\Family Guy\The Simpsons\ are entered into the Library as Season 1 Episode 1 of 'The Simpsons'
Likewise for 'Scan for new content' Run on the 'Family Guy' folder the episodes are entered as Season 1 Episode 1 of 'The Simpsons'
However, VIA 'TV Show Information' run on the 'Family Guy' folder The file 'S01E01 Death Has a Shadow.avi' is entered into the library as Family Guy Season 1 Episode 1
fixed in svn.
as for set content, are ppl blind. it says tv showS S S S S S.
a tv show is a folder.
if you assign tv showS content to the family guy dir you say that all subfolders for this dir is a tvshow. it does exactly what you ask it to do.
Running XBMC-SVN_2007-03-23_rev8306-T3CH-PROPER with the following settings
AdvancedSettings.xml contents:
<advancedsettings>
<tvshowmatching>
<regexp>.*[Ss]([0-9]*).*[Ee]([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>
<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>
Directory Structur and Naming Convention :
(it's on a smb share)
Series\4400 S03\4400 S03 E01.avi
Series\Greys Anatomy S02\Greys Anatomy S02 E01.avi
Series\Joey\Joey S02 E12-13.avi
i have assigned tv shows content to the Series folder and i do a complete Scan. All series are found but episodes are all skipped, the only one episode found on all my series is the last one : Joey\Joey S02 E12-13.avi it appear like Saison 2/Joey Episode 13 in library mode.
The regexp in red is the one i added to match my naming, i tested it on some sites and tools and it work 100%.
any idea what i can do to have it work ?
thx in advance and believe me i tried a lot of things before post here ..
take care.
get a newer version, there are bugs in that one.
ok i'll wait the next T3CH version so. i'm not able to compil it myself (not the tools for..)
majestix
2007-03-29, 21:59
Spiff, thanks for your help.
as for set content, are ppl blind. it says tv showS S S S S S.
That makes perfect sense now. After 4 hours of testing other things that was extremely confusing
majestix
2007-03-29, 22:05
Does anyone know of anyway to scan for Episodes inside of RAR files?
I've tried a number of different things and nothing has worked.
yah, i'm pondering adding 'tvshow' as content type as well but i bet it wouldnt help a bit ;D
enable transparent archives.
required for any rarred content scanning.
El Piranna
2007-04-17, 01:58
I have found this page (http://www.xboxmediacenter.com/wiki/index.php?title=TV_Shows) and it seems that it fails with me by the regexp. I have, for example, "Las chicas Girlmore\T1\01 - Capitulo piloto". It means i must to change "Season " by "T" to make it work? What file is it? How it would be possible to add several regexp? Season is english only, so here at spain we use more the "TvShow [season]x[chapter] - chapter name" for individual chapters and "TvShow/T[season]/[chapter] - chapter" for full TvShows...
TornSack
2007-04-25, 08:43
If seen several comments about scanning recursively when "set content" = TV Shows, however, I don't have this option when I set content = TV Shows.
When I set content = Movies I do have the option to scan recursively.
What am I doing wrong? I'm running XBMC rev8582.
NProszkow
2007-04-25, 09:34
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.
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.
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:
<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?
jmarshall
2007-04-25, 12:09
You are missing <advancedsettings>
Please, please indicate how we can make this more obvious in the online manual!
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?
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:
<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...
J_K_M_A_N
2007-04-25, 15:13
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
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.
NProszkow
2007-04-26, 06:08
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!
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
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?
Thanks for your help, sorry I'm just learning.
NProszkow
2007-04-26, 17:42
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
<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:
<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:
<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?
leigh_munro
2007-04-30, 16:01
I'm lost with all this guys....is anyone able to help with something that would work with my file structure.
H:\TV Shows\Heroes\Heroes - Season 1\Heroes - S01E01 - Genesis.avi
H:\TV Shows\Heroes\Heroes - Season 1\Heroes - S01E02 - Don't Look Back.avi
H:\TV Shows\Heroes\Heroes - Season 1\Heroes - S01E03 - One Giant Leap.avi
gzusrawx
2007-04-30, 17:35
I think that's already supported by default. Don't make any entries in AdvancedSettings.xml if it is cause it overrides the defaults
GhostDog
2007-05-01, 03:13
The problem I'm having is that sometimes it gets the show info, and episode info for shows, most of the time it doesn't.
I leave the name of my shows in the default group release names
i.e. Supernatural.S02E13.HDTV.XviD-XOR.avi
i.e. my.name.is.earl.s02e20.hdtv.xvid-xor.[VTV].avi
Here's my debug log without a customized advancesettings.xml file when it works (as I know it can pickup show names in the above format without one by default).
Punkd.S08E01.DSR.XviD-SYS.avi
19:40:04 M: 37933056 DEBUG: DIRECTORY::CSMBDirectory::OpenDir - Using authentication url smb://xbox:xbox2020@192.192.192.192/TV%20Shows
19:40:07 M: 37666816 DEBUG: Saving fileitems [smb://192.192.192.192/TV Shows/]
19:40:07 M: 37666816 DEBUG: -- items: 7, sort method: 0, ascending: false
19:40:08 M: 36864000 DEBUG: CApplication::OnKey: 167 pressed, action is 4
19:40:09 M: 36864000 DEBUG: CApplication::OnKey: 166 pressed, action is 3
19:40:10 M: 36864000 DEBUG: CApplication::OnKey: 11 pressed, action is 7
19:40:10 M: 36851712 DEBUG: Clearing cached fileitems [smb://192.192.192.192/TV Shows/01 Mon/]
19:40:10 M: 36851712 ERROR: XFILE::CFile::Delete - Error deleting file Z:\d6a81aa5.fi
19:40:10 M: 37679104 DEBUG: CGUIMediaWindow::GetDirectory (smb://192.192.192.192/TV Shows/01 Mon/)
19:40:10 M: 37679104 DEBUG: ParentPath = [smb://192.192.192.192/TV Shows/]
19:40:10 M: 37679104 DEBUG: DIRECTORY::CSMBDirectory::OpenDir - Using authentication url smb://xbox:xbox2020@192.192.192.192/TV%20Shows/01%20Mon
19:40:12 M: 36003840 DEBUG: CApplication::OnKey: 167 pressed, action is 4
19:40:13 M: 36003840 DEBUG: CApplication::OnKey: 167 pressed, action is 4
19:40:17 M: 36003840 DEBUG: CApplication::OnKey: 195 pressed, action is 11
19:40:17 M: 36003840 DEBUG: DIRECTORY::CSMBDirectory::OpenDir - Using authentication url smb://xbox:xbox2020@192.192.192.192/TV%20Shows/01%20Mon/Punk%27d
19:40:17 M: 36003840 INFO: Loading skin file: DialogProgress.xml
19:40:17 M: 35053568 INFO: Get URL: http://tvdb.zsori.com/interfaces/GetSeries.php?seriesname=punk'd
19:40:18 M: 35577856 INFO: Loading skin file: DialogSelect.xml
19:40:19 M: 35352576 DEBUG: CApplication::OnKey: 11 pressed, action is 7
19:40:21 M: 35999744 INFO: Loading skin file: DialogProgress.xml
19:40:21 M: 35561472 INFO: Get URL: http://tvdb.zsori.com/interfaces/GetSeries.php?seriesname=punk'd
19:40:22 M: 35561472 INFO: Get URL: http://tvdb.zsori.com/interfaces/GetBanners.php?seriesid=72268
19:40:30 M: 35561472 DEBUG: DIRECTORY::CSMBDirectory::OpenDir - Using authentication url smb://xbox:xbox2020@192.192.192.192/TV%20Shows/01%20Mon
19:40:30 M: 35561472 DEBUG: DIRECTORY::CSMBDirectory::OpenDir - Using authentication url smb://xbox:xbox2020@192.192.192.192/TV%20Shows/01%20Mon/24
19:40:30 M: 35561472 DEBUG: DIRECTORY::CSMBDirectory::OpenDir - Using authentication url smb://xbox:xbox2020@192.192.192.192/TV%20Shows/01%20Mon/Drive
19:40:30 M: 35561472 DEBUG: DIRECTORY::CSMBDirectory::OpenDir - Using authentication url smb://xbox:xbox2020@192.192.192.192/TV%20Shows/01%20Mon/Heroes
19:40:30 M: 35561472 DEBUG: DIRECTORY::CSMBDirectory::OpenDir - Using authentication url smb://xbox:xbox2020@192.192.192.192/TV%20Shows/01%20Mon/Prison%20Break
19:40:30 M: 35561472 DEBUG: DIRECTORY::CSMBDirectory::OpenDir - Using authentication url smb://xbox:xbox2020@192.192.192.192/TV%20Shows/01%20Mon/Punk%27d
19:40:30 M: 35561472 DEBUG: DIRECTORY::CSMBDirectory::OpenDir - Using authentication url smb://xbox:xbox2020@192.192.192.192/TV%20Shows/01%20Mon/Weeds
19:40:30 M: 35561472 DEBUG: running expression \[[Ss]([0-9]+)\]_\[[Ee][0-9][0-9]-([0-9]+)\][^\\/]* on label smb://192.192.192.192/tv shows/01 mon/drive/drive.101.hdtv-lol.avi
19:40:30 M: 35561472 DEBUG: running expression [\._ -][Ss]([0-9]+)[^0-9]*[Ee][0-9][0-9]-([0-9]+)[^\\/]* on label smb://192.192.192.192/tv shows/01 mon/drive/drive.101.hdtv-lol.avi
Not working example:
Painkiller.Jane.S01E01.DSR.XviD-NoTV.avi
20:06:51 M: 35876864 DEBUG: CGUIMediaWindow::GetDirectory (smb://192.168.1.200/TV Shows/05 Fri/)
20:06:51 M: 35876864 DEBUG: ParentPath = [smb://192.168.1.200/TV Shows/05 Fri/]
20:06:51 M: 35876864 DEBUG: DIRECTORY::CSMBDirectory::OpenDir - Using authentication url smb://xbox:xbox2020@192.168.1.200/TV%20Shows/05%20Fri
20:06:52 M: 35012608 DEBUG: CApplication::OnKey: 11 pressed, action is 7
20:06:52 M: 35000320 DEBUG: Clearing cached fileitems [smb://192.168.1.200/TV Shows/05 Fri/Painkiller Jane/]
20:06:52 M: 35000320 ERROR: XFILE::CFile::Delete - Error deleting file Z:\f97dab3e.fi
20:06:52 M: 35864576 DEBUG: CGUIMediaWindow::GetDirectory (smb://192.168.1.200/TV Shows/05 Fri/Painkiller Jane/)
20:06:52 M: 35864576 DEBUG: ParentPath = [smb://192.168.1.200/TV Shows/05 Fri/]
20:06:52 M: 35864576 DEBUG: DIRECTORY::CSMBDirectory::OpenDir - Using authentication url smb://xbox:xbox2020@192.168.1.200/TV%20Shows/05%20Fri/Painkiller%20Jane
20:06:56 M: 36298752 DEBUG: CApplication::OnKey: 216 pressed, action is 9
20:06:56 M: 36397056 DEBUG: CGUIMediaWindow::GetDirectory (smb://192.168.1.200/TV Shows/05 Fri/)
20:06:56 M: 36397056 DEBUG: ParentPath = [smb://192.168.1.200/TV Shows/]
20:06:56 M: 36397056 DEBUG: DIRECTORY::CSMBDirectory::OpenDir - Using authentication url smb://xbox:xbox2020@192.168.1.200/TV%20Shows/05%20Fri
20:06:58 M: 35012608 DEBUG: CApplication::OnKey: 195 pressed, action is 11
20:06:58 M: 35012608 DEBUG: DIRECTORY::CSMBDirectory::OpenDir - Using authentication url smb://xbox:xbox2020@192.168.1.200/TV%20Shows/05%20Fri/Painkiller%20Jane
20:06:58 M: 35012608 INFO: Loading skin file: DialogProgress.xml
20:06:58 M: 34066432 INFO: Get URL: http://tvdb.zsori.com/interfaces/GetSeries.php?seriesname=painkiller+jane
20:07:01 M: 34566144 INFO: Loading skin file: DialogSelect.xml
20:07:03 M: 34304000 DEBUG: CApplication::OnKey: 11 pressed, action is 7
20:07:04 M: 34988032 INFO: Loading skin file: DialogProgress.xml
20:07:04 M: 34557952 INFO: Get URL: http://tvdb.zsori.com/interfaces/GetSeries.php?seriesname=painkiller+jane
20:07:07 M: 34537472 INFO: Get URL: http://tvdb.zsori.com/interfaces/GetBanners.php?seriesid=75546
20:07:08 M: 34549760 INFO: Loading skin file: DialogVideoInfo.xml
20:07:10 M: 34918400 DEBUG: CApplication::OnKey: 11 pressed, action is 7
20:07:11 M: 34988032 INFO: Loading skin file: DialogProgress.xml
20:07:11 M: 34041856 INFO: Get URL: http://tvdb.zsori.com/interfaces/GetSeries.php?seriesname=painkiller+jane
20:07:14 M: 34566144 INFO: Loading skin file: DialogSelect.xml
20:07:19 M: 34304000 DEBUG: CApplication::OnKey: 11 pressed, action is 7
20:07:19 M: 34975744 INFO: Loading skin file: DialogProgress.xml
20:07:20 M: 34557952 INFO: Get URL: http://tvdb.zsori.com/interfaces/GetSeries.php?seriesname=painkiller+jane
20:07:23 M: 34537472 INFO: Get URL: http://tvdb.zsori.com/interfaces/GetBanners.php?seriesid=75546
20:07:23 M: 34553856 INFO: Loading skin file: DialogVideoInfo.xml
I've tried using a customized advancedsettings.xml file as well, but there has been no change. It seems like it's hit, and miss for me. Sometimes, it works, most of the time it doesn't.
I'm using the latest T3CH build.
GhostDog
2007-05-02, 04:06
I found out what the problem was. It was my folder structure.
E:\TV Shows\01 Mon\Drive - Doesn't correctly scan
E:\TV Shows\Mon\Drive - Doesn't correctly scan either
E:\TV Shows\Drive - Works fine
I'll no longer use the days of the week.
sakamoto
2007-05-07, 19:09
could someone please help me with the regexps I should use? My TV eps are stored as follows:
F:\TV Series\Lost\01x01-First.Episode.Pilot.avi
F:\TV Series\Lost\01x02-Second.Episode.Pilot.avi
...
F:\TV Series\The Sopranos\01x01-First.Episode.Pilot.avi
F:\TV Series\The Sopranos\01x02-First.Episode.Pilot.avi
...
Many thanks for the help!
sakamoto
2007-05-07, 19:40
could someone please help me with the regexps I should use? My TV eps are stored as follows:
F:\TV Series\Lost\01x01-First.Episode.Pilot.avi
F:\TV Series\Lost\01x02-Second.Episode.Pilot.avi
...
F:\TV Series\The Sopranos\01x01-First.Episode.Pilot.avi
F:\TV Series\The Sopranos\01x02-First.Episode.Pilot.avi
...
Many thanks for the help!
would these be valuable options?
<tvshowmatching>
<regexp>[0]*([0-9]+)x[0]*([0-9]+)-[^\\/]*</regexp>
</tvshowmatching>
OR
<tvshowmatching>
<regexp>([0-9]+)x([0-9]+)-[^\\/]*</regexp>
</tvshowmatching>
Yes both should work imo.
tempxbmcusr
2007-06-18, 21:41
I am not familiar with these type of strings. I have read the wiki and the other posts and have come up with the following set of strings that I had hoped would work, but sadly have not. This is what I have come up with:
<tvshowmatching>
<regexp>([0-9]+)([0-9][0-9])[^\\/]*</regexp>
<regexp>season([0-9]+)[\\/]episode([0-9]+)[^\\/]*</regexp>
<regexp>Season[\._ ]([0-9]+)[\\/]([0-9]+)[^\\/]*</regexp>
<regexp>[Ss]eason([0-9]+)[\\/]episode([0-9]+)[^\\/]*</regexp>
<regexp>[Ss]eason[\._ ]([0-9]+)[\\/]([0-9]+)[^\\/]*</regexp>
<twopart>
<regexp>\[[Ss]([0-9]+)\]_\[[Ee][0-9][0-9]\-([0-9]+)\][^\\/]*</regexp> % foo_[s01]_[e01-02]
<regexp>[\._ \-][Ss]([0-9]+)[^0-9]*[Ee][0-9][0-9]\-([0-9]+)[^\\/]*</regexp> % foo.s01.e01-02
<regexp>[\._ \-][0-9]+x[0-9]+[\._ \-]*([0-9]+)x([0-9]+)[^\\/]*</regexp> % foo.1x09 1x10
</twopart>
</tvshowmatching>
The files are all located in the following directory structure:
smb:\\TV\[Show Name]\Season #\[s#][ee] - [ep name].avi
season number is one or two digits. ep number is 01-99.
for example "TV\24\Season 1\101 - Series Premier.avi"
Thanks for any and all help!
J_K_M_A_N
2007-06-18, 22:09
You can't have the season number be 1 or 2 numbers unless you have some way of telling it that the season number has ended. Like an x or a . like this:
"TV\24\Season 1\1.01 - Series Premier.avi"
or:
"TV\24\Season 1\1x01 - Series Premier.avi"
Otherwise it has no way of knowing if the season number is 1 to 2 digits. If you add either of those, the default setting should work (I believe).
Good luck.
J_K_M_A_N
Not entirely true, JKMAN... if episode is always 2 digits, then you can assume that the remaining numbers are the season:
[Ss]eason [0-9]+[\\/]([0-9]+)([0-9][0-9])[^\\/]*
However, JKMAN's suggestion on how to name your stuff is accurate, tempxbmcusr. Some rare series might have more than 100 episodes in a season (soap operas are an obvious example) and will break this naming scheme. It's better to use one of the more popular naming schemes and protect yourself from having to rename everything down the line.
tempxbmcusr
2007-06-19, 22:15
J_K_M_A_N and szsori:
Thank you both for your responses. I never really thought about the fact that the season number on the files themselves would be causing problems. It was one of those oversights when you are too used to your way.
Thanks!
tempxbmcusr
2007-06-20, 00:32
I have another question. Do you know how the database sees the path for the file? If, so does it depend on where the "Set Content" flag is set? When I changed the file name to just including the ep number (see above posts) and set the TV directory (SMB:\\COMPUTER\TV\Series\Season #\## - ep name.avi) to be the content TV, it did not find the episodes. However, when TV content is set to NONE and I set the individual series folder to TV it was able to find an episode. There are too many series folders to do it individually and there has to be a way to put it higher in the path hierarchy.
Therefore I thought that maybe there was a difference in the path that depends on where the content is set. So I added a *[/\/] to the beginning of the regexp so that it would ignore everything before the [Ss]eason part of the path. But this did not work.
<tvshowmatching>
<regexp>[Ss]eason [0-9]+[\\/]([0-9]+)([0-9][0-9])[^\\/]*</regexp>
<regexp>[Ss]eason[\._ ]([0-9]+)[\\/]([0-9]+)[^\\/]*</regexp>
<regexp>*[\\/][Ss]eason [0-9]+[\\/]([0-9]+)([0-9][0-9])[^\\/]*</regexp>
<regexp>*[\\/][Ss]eason[\._ ]([0-9]+)[\\/]([0-9]+)[^\\/]*</regexp>
</tvshowmatching>
Also, does a regexp work from R->L or L->R when it is looking at a string (path)?
Once I get mine working I am willing to write a xbmc regexp generator based on user defined paths and possibly "set content" flags (if that ends up being involved).
Thanks!
J_K_M_A_N
2007-06-20, 00:38
Not entirely true, JKMAN... if episode is always 2 digits, then you can assume that the remaining numbers are the season:
I was just basing my answer on the fact that he said the season number was 1 or 2 digits. He didn't say it was always 2. I should have been more clear. :sad:
I believe the first directory below the set content folder is used as the show name. I also believe that spiff added the option to set content on the folder of the show itself. You have to watch for the 's'. One says TV Shows and I think the other says TV Show.
Good luck.
J_K_M_A_N
downset211
2007-07-21, 10:09
I've been trying to figure this out on my own for awhile but have been having problems so hoping someone here might be able to help.
here's what I have. So far this is working -
SeriesName\Season 1\SeriesName - 08.avi
all of Season 1 shows up fine in the library that way, however -
SeriesName\Season 3\SeriesName_66.avi
which is episode 66 of the series or episode 15 of season 3
or -
SeriesName\Season 6\SeriesName_124.avi
which is episode 124 of the series or episode 4 of season 6
those don't show up in the library at all. I know the naming scheme is kinda funky, is SeriesName_EpisodeNumber.xxx
tv.com does use those episode numbers (season 3 episode 66 vs season 3 episode 15)so I was hoping i wouldn't have to go renaming 6 season's worth of stuff if I didn't have to. I really hope I'm making sense here but I've been racking my brain out with these expressions but I must just be completely dense and can't figure it out. Hoping someone could help if it can be done at all, or let me know if it's just not possible either.
jmarshall
2007-07-21, 10:41
You have to rename.
clintshaneh
2007-07-22, 03:10
Been working on this for hours now and can't seem to get it..
My directories are setup like this:
TV/Show/S03E02 - episodetitle.avi
and i'm trying to use :
<regexp>S[0]*([0-9]+)E[0]*([0-9]+)[^\\/]*</regexp>
and the scans find nothing, any ideas?
earthtorob
2007-07-25, 00:22
I found a website the helps explains how to use regular expressions.
http://www.regular-expressions.info/tutorial.html
I'm still having problems though.
My files are organized as follows:
Tv Shows\Name\season #\(###) Title.avi
I'm trying..
<regexp>Season ([0-9])[\\(.]([0-9]+)[^\\/]*</regexp>
I think...
Season - makes match. Is this needed?
([0-9]) - Parens () says to use match inside, brackets [] define char set 0-9
[\\(.] - Brackets [] say to match data inside \\(. says match \( and one char.
([0-9]+) - () again says to use data inside, [0-9]+ says match any number of digits.
[^\\/]* - I don't know what it does. everyone else seams to like it though.
So.... that is what I'm trying to match and you see what I'm trying. It's not working. :(
one other question. If I define some regular expressions in the advancedsettings, does it wipe out the defaults?
Thanks.
I don't think XBMC can pull the season from the directory, so you'll have to get the season number into the filename itself. If your (###) is the season and episode combined, you should consider separating them with an x or period. Recommended naming conventions:
Series - S01E01 - Episode Name.avi
Series - 01x01 - Episode Name.avi
You can leave off "Series", since the scraper pulls that from the folder, but I prefer having it on there in case I'm moving files around. Episode name is also optional, but it helps in case you're viewing stuff in file mode and looking for a specific episode.
earthtorob
2007-07-25, 00:48
I beive it does use the folder name to dientify the show. I've read it somewhere, could someone verify?
Also the (###) is the season ep number combined. ie :
Season 4 episode 13 would be (413).
I thought about using ([0-9])([0-9][0-9])
That would use the first # and then ##.
But how does the computer know which number is the season number and which is the ep number?
I feel like I'm defining variables. Is that what I'm doing?
jmarshall
2007-07-25, 01:01
Should be able to handle anywhere within the path of the file.
I suspect you need to escape the (. Try:
<regexp>Season ([0-9])\\\(([0-9]+)[^\\/]*</regexp>
Note that the first \\ is just matching \, then \( matches (. As these are characters used to construct regexps, we need to escape them with a \.
Sites such as http://www.quanetic.com/regex.php are useful for testing (note it'll escape stuff for you).
Cheers,
Jonathan
earthtorob
2007-07-25, 11:32
I'm a bit confused.
If the idea is to match a patteren, I think I can do that.
Is the idea to match the relevant data? Or the data that is not needed?
I could match the entire string... something like this ([0-z]+)
I'm assuming the idea is to capture the name of the tv show, season number and ep number, to send to the internet database.
How does this thing work?
as is THOROUGHLY explained in the manual, tons of times here (see my first post for instance), all you have to match is the season number and the ep number.
earthtorob
2007-07-25, 23:54
as is THOROUGHLY explained in the manual, tons of times here (see my first post for instance), all you have to match is the season number and the ep number.
What I am confused about is the idea of matching. If I include a char set [Season] the system will 'match' the first occurrence of the word 'Season'.
But what is the point of that? Is the data 'Season' returned to the internet?
I don't mean to sound obtuse, but I am genuinely confused.
I’ll do more reading.
Thanks for the help. :)
What I am confused about is the idea of matching. If I include a char set [Season] the system will 'match' the first occurrence of the word 'Season'.
But what is the point of that?
The point is that you can then match anything before or after whatever string you're putting in there. You also don't need [Season]... you just need Season. By enclosing something in brackets, you're allowing the regex to match anything in there. So your [Season] would match S, e, a, s, o, or n.
When we mention "matching", it means that text in the filename matches that part of the regex. What you want to focus on is "capturing", which is done by enclosing it with parentheses. This is how you capture your season and episode numbers... by enclosing the \d+ or [0-9][0-9] in parens.
If you can't figure it out from looking at the examples or the numerous regex tutorials on Google, you'll probably find it far easier just renaming all of your files to match a common naming structure.
main thing to remember is what regular expressions lets you do.
they allow you to specify a textual pattern. the point of specifying the Season in the expression is to give them numbers context. without it, you would match any occourence of numbers - certainly not what you are after. when i'm in doubt i usually spell the regular expressions out loud. example:
Season([0-9]+) - Episode([0-9]+)
"my pattern consists of the word 'Season' followed by 1 or more numbers which i'm interested in, then ' - Episode' followed by 1 or more numbers which i'm also interested in"
see, easy as pie :P
earthtorob
2007-07-26, 01:18
As I understand it……
The idea is to send the season number and episode number to the internet.
The data you want to send should be encapsulated in parentheses ( ).
To find the numbers in the string you’ll want to tell the computer to look through the string and ‘match’ any char between 0-9. Like so [0-9].
Brackets [] define a character set to match to. Parens ( ) tell the computer to return the matching data.
So ... ([0-9]) tells the computer to look through the entire string and return the very first number it finds.
Is this right so far?
jmarshall
2007-07-26, 01:25
correct.
earthtorob
2007-07-26, 01:27
main thing to remember is what regular expressions lets you do.
they allow you to specify a textual pattern. the point of specifying the Season in the expression is to give them numbers context. without it, you would match any occourence of numbers - certainly not what you are after. when i'm in doubt i usually spell the regular expressions out loud. example:
Season([0-9]+) - Episode([0-9]+)
"my pattern consists of the word 'Season' followed by 1 or more numbers which i'm interested in, then ' - Episode' followed by 1 or more numbers which i'm also interested in"
see, easy as pie :P
So I would not need to match every char after the word season?
If ...
Lost\Season 2\(204) name of show
I could ...
Season([0-9])[0-9]([0-9]+)
or
Season [0-9]([0-9])([0-9]+)
Just useing the word Season to find my place in the string?
Why do I need to find my place? Couldn't I just match the first number and return that? The skip the next and return the next two?
what if your showname has numbers in it? your episode name has numbers in it? the path has a number somewhere (many urls have ports in them for instance)? and so on. as i said you need to give it context so you match only the correct numbers.
btw, none of those regexps would match your example at all.
Season ([0-9]+)[\\/]\(([0-9]+)\)
my final words on this for sure - if you dont get it read a regexp tutorial.
jmarshall
2007-07-26, 01:38
You have to find your place incase you are interested in the tv show num3ers. It'd possibly match the 3 otherwise.
Neither of those regexps will work - you want to match "Season " to find your place, then 1 or more numbers, then "\(" then one or more numbers.
So:
Season ([0-9]+)\\\(([0-9]+)
will do the trick. Note that I've replaced the "\(" match with each of those characters escaped with a \ as they otherwise have special meaning in regexps.
Honestly - this isn't a place to get tutorial advice about regexps - we're happy to provide a few pointers, but there's plenty of other sites out there with full tutorials on how regexps work.
earthtorob
2007-07-26, 01:46
Okay….. All my shows are in this format…
Series name\Season #\(###) Episode name
Example
The Wire\Season 3\(307) Back Burners
Since all my files are backed up to DVD and I don’t want to rename a couple hundred files and back those up again, I’ll try this….
I could match the first parentheses and return the next three digits.
The first digit is the season number and the next two is the episode number.
So…
[\(]([0-9])([0-9]+)
Could it be that simple?
jmarshall
2007-07-26, 01:58
Arrrgghhhh!
Both spiff and I gave you regexps that'll work just fine. Why do you insist on trying to roll your own when you clearly do NOT understand it.
Take some time to READ what we've said, READ some tutorial sites, and try the regexps that we've given you out for yourself on regexp tester sites. Keep going until you understand it.
Let this be the end of it.
earthtorob
2007-07-26, 02:30
I've never been much on forums.
Not real sure about the etiquette.
Sorry.
earthtorob
2007-07-26, 02:44
Sorry to be such a bother guys.
Seeing all the other posts (almost 100 now) I thought this was a place for this kind of assistance. I don’t know how my questions were different from other people’s questions.
I did see that the answers were different though.
I appreciate that you took the time to explain how the thing works.
Thanks.
BlackDwarf
2007-08-07, 21:43
Hi guys.
Excuse my n00bishness (and seemingly resurrecting a dead thread) but I'm having trouble getting my regular expressions to work.
All my shows are in this format:
[TV Show]/Season #/S##xE## - Episode Name.extension
I've tried all I can, but I think it just comes down to the fact I'm crap at all this :D
Thanks a lot for your help.
[TV Show]/Season #/S##xE## - Episode Name.extension
Change this line:
<regexp>[\._ \-][Ss]([0-9]*)[\.\-]?[Ee]([0-9]*)[^\\/]*</regexp>
To look like this (note the x):
<regexp>[\._ \-][Ss]([0-9]*)[\.\-x]?[Ee]([0-9]*)[^\\/]*</regexp>
I think that should work for you, unless I'm missing something obvious.
BlackDwarf
2007-08-10, 17:43
Thanks szsori
However it doesn't seem to have worked.
Here's the (fairly empty) contents of my AdvancedSettings.xml:
<videostacking>
<tvshowmatching>
<regexp>[\._ \-][Ss]([0-9]*)[\.\-x]?[Ee]([0-9]*)[^\\/]*</regexp>
</tvshowmatching>
</videostacking>
It picks up maybe a couple of episodes, but not all. Ideas?
Cheers
mind the <advancedsettings>
BlackDwarf
2007-08-10, 17:54
What, so there's supposed to be
<AdvancedSettings></AdvancedSettings>
around it all?
In that case, that could be the problem.... ???
yes, as is clearly stated on the wiki (at times i wonder why we bother with the wiki - nobody reads it anyway it seems)
BlackDwarf
2007-08-10, 18:15
Ok, I apologise, however mine still doesn't seem to be working.
Contents are now:
<AdvancedSettings>
<videostacking>
<tvshowmatching>
<regexp>[\._ \-][Ss]([0-9]*)[\.\-x]?[Ee]([0-9]*)[^\\/]*</regexp>
</tvshowmatching>
</videostacking>
</AdvancedSettings>
Is something still wrong for it to read this convention:
[TV Show]/Season #/S##xE## - Episode Name.extension
E.G.
[Heroes]/Season 1/S01xE05 - Hirros.avi
xml is case sensitive.
<advancedsettings>...</advancedsettings>
furthermore, <tvshowmatching> is NOT a childtag of <videostacking>
and your expression wont match those names obviously as it doesnt describe that pattern.
'we start with a ., a _, a ' ', a -. then a S or a s, 0 or more numbers we want, then optionally either a ., a - or a x, then a E or e then 0 or more numbers we want before we can have any number of chars that aint a slash'.
does that fit your filenames?
Jumping into this thread here...
My TV shows are stored on a NAS as
/TV/Series Name/Season #/## - episode.*
I thought from reading the wiki that I could just set the contents of the /TV folder to tv shows, and the scraper would recursively find each series name from there. It's not working that way. I instead have to set the content for each series folder and then do the scrape for each series folder individually.
I'm using the regexp supplied in the wiki for my naming scheme. Is what I'm expecting not the way this is supposed to work?
Cheers
Fred
yes, set the content of the tvshows folder making sure 'this folder contains a single tv show' is not ticked. that's how it is supposed to work and afaik thats how it works
gmpasSOS
2007-09-13, 14:28
Hi everyone,
I'm almos sure my XBMC's behavior is kind of strange... My tvshow path is:
TV\tvshow name\Season #\S##_E##. avi (ex.: TV\Life On Mars\Season 1|S01_E03.avi). Simple, ahn?! But doesnt work!
I made no changes to original tvshowmatching section, 'cause I believed that one of that expressions fits my situation, but dont work.
On the library, just the TV show name appear, with no season or even episodes inside it...
Can anyone help me with this? Thank you all!
earthtorob
2007-09-13, 23:15
My tvshow path is:
TV\tvshow name\Season #\S##_E##. avi (ex.: TV\Life On Mars\Season 1|S01_E03.avi).
Those don't match.
Season #\S##
Season 1|S01
Is Season 1 a folder or is your filename contain 'Season 1'?
Anyway I had tons of problems with expressions until I realised that I wasn't scanning for content correctly.
gmpasSOS
2007-09-14, 00:15
Those don't match.
Season #\S##
Season 1|S01
It was a typing error. The correct exemple is (...)Season 1\S01(...), "Season 1" is a folder...
ANd again, thanks for the attention
TornSack
2007-10-04, 05:04
I believe I may also be having regexp problems.
The following AdvancedSettings.xml was working for me several months ago:
<advancedsettings>
<tvshowmatching>
<regexp>([0-9]+)([0-9][0-9])[^\\/]*</regexp>
</tvshowmatching>
</advancedsettings>
However, after a recent upgraded to XBMC-SVN_2007-09-30_rev10387-T3CH I attempted to add some new files to my library, and ended up with some sort of db corruption. So I deleted /C/XBMC/UserData/Database/MyVideos34.db and restarted XBMC. Ever since I haven't been able to get the scraper to pickup my TV Shows (Movies work fine). Here's my directory structure and scraping method.
Vidoes\TV\The Office\Season 1\101 - Pilot.avi
Vidoes\TV\The Office\Season 1\102 - Diversity Day.avi
Vidoes\TV\Heroes\Season 1\101 - Pilot.avi
etc...
I run 'Set Content' on the "TV" directory (Vidoes\TV\) using the Zsori TV Database scraper with Run Automated Scan checked. What I end up with is all of my TV Series directories (The Office, Heroes, etc) in the Library, but no episodes (when I click into the directories they're empty). I played around with setting the content from different directories and using each of the other tv scrapers, I delete the database and reboot XBMC between each attempt, but the results are always similar.
I downgraded to XBMC-SVN_2007-09-17_rev10259-T3CH with the same results, so I'm pretty sure there's some user error. I'm assuming my regexp is the root.
On a final note, I'd like to--once i get the standard regexp working--add a <twopart> for the following episode titling scenario:
Vidoes\TV\The Office\Season 1\101-02 - Pilot & Diversity Day.avi
(above example is season 1 ep1 and ep1 in a single AVI file)
...reading up on debug reporting now, just in case my regexp is ok.
Thx
-TS
djdafreund
2007-10-04, 07:08
Jumping into this thread here...
My TV shows are stored on a NAS as
/TV/Series Name/Season #/## - episode.*
I thought from reading the wiki that I could just set the contents of the /TV folder to tv shows, and the scraper would recursively find each series name from there. It's not working that way. I instead have to set the content for each series folder and then do the scrape for each series folder individually.
I'm using the regexp supplied in the wiki for my naming scheme. Is what I'm expecting not the way this is supposed to work?
Cheers
Fred
yes, set the content of the tvshows folder making sure 'this folder contains a single tv show' is not ticked. that's how it is supposed to work and afaik thats how it works
I just wanted to elaborate on this and add something, from doing a lot of recent testings, due to running into a glitch. Now, agrreeing with Spiff on making sure the MAIN "TV Shows" folder's 'this folder contains a single tv show' is not ticked is true, but i wanted to add that making sure the series individual folders content's 'this folder contains a single tv show' IS ticked for each show's folders (IE-Heroes, Family Guy, Hous, Simpsons,etc.).
I am bringing this to attention, as when i recently reorganized some things (small tweaks), somehow 2 tv show folders got unticked (while starting from scratch a new database), and couldn't figure out (from not noticing, not thinking this kind of glitch could happen, since only 2 folders had this happen with no personal changes to have cause this, to my knowledge. ) why each series info for that show kept showing up as "Dark Season", with all series info matching.
IE-
Heroes- (info showed up fine.)
-\Season 1- (Season info showing up as "Dark Season" show.)
....\Episode 1,etc. (All wrong info.)
-\Season 2- (Season info showing up as "Dark Season" show.)
....\Episode 1,etc. (All wrong info also.)
Following the wiki's scraping of 'TV Shows\(showname)\(season#)\101 - ***,and so forth.
So i simply removed those folders from the database (which newest svn xbmc also now cleans in process, THANKS AGAIN for that!!! Nice!!), and MADE SURE that those 2 tv shows folders 'this folder contains a single tv show' WERE ticked this time, and rescanned again, fixing this all up again.
So, i don't know how that happened (Only 2 folders of 10 had that option UNTICKED, which messed up things.), but i wanted to just add that to Spiffs info above, that when 'this folder contains a single tv show' is not ticked for main TV SHOWS folder, and if people are running into this above situation, use above to double check and fix it. Since this can possibly happen, unexpectingly. Just make sure that each shows folder's content option 'this folder contains a single tv show' IS checked. Hopefully that might straighen out SOME people's confusion, or answer questions if they've ran into this same thing. I know how this works, and would've not thought into it at 1st until looking around in each folder to double-check, and if not for that would've not noticed at 1st. Smack me on the hand for not double-checking i guess, but i really haven't had this happen before (making a setting, and instead of all 10 folders adhearing to this, 2 of them somehow changed opposite by themselves.)
TornSack
2007-10-04, 07:58
I just wanted to elaborate on this and add something, from doing a lot of recent testings, due to running into a glitch. Now, agrreeing with Spiff on making sure the MAIN "TV Shows" folder's 'this folder contains a single tv show' is not ticked is true, but i wanted to add that making sure the series individual folders content's 'this folder contains a single tv show' IS ticked for each show's folders (IE-Heroes, Family Guy, Hous, Simpsons,etc.).
I am bringing this to attention, as when i recently reorganized some things (small tweaks), somehow 2 tv show folders got unticked (while starting from scratch a new database), and couldn't figure out (from not noticing, not thinking this kind of glitch could happen, since only 2 folders had this happen with no personal changes to have cause this, to my knowledge. ) why each series info for that show kept showing up as "Dark Season", with all series info matching.
IE-
Heroes- (info showed up fine.)
-\Season 1- (Season info showing up as "Dark Season" show.)
....\Episode 1,etc. (All wrong info.)
-\Season 2- (Season info showing up as "Dark Season" show.)
....\Episode 1,etc. (All wrong info also.)
Following the wiki's scraping of 'TV Shows\(showname)\(season#)\101 - ***,and so forth.
So i simply removed those folders from the database (which newest svn xbmc also now cleans in process, THANKS AGAIN for that!!! Nice!!), and MADE SURE that those 2 tv shows folders 'this folder contains a single tv show' WERE ticked this time, and rescanned again, fixing this all up again.
So, i don't know how that happened (Only 2 folders of 10 had that option UNTICKED, which messed up things.), but i wanted to just add that to Spiffs info above, that when 'this folder contains a single tv show' is not ticked for main TV SHOWS folder, and if people are running into this above situation, use above to double check and fix it. Since this can possibly happen, unexpectingly. Just make sure that each shows folder's content option 'this folder contains a single tv show' IS checked. Hopefully that might straighen out SOME people's confusion, or answer questions if they've ran into this same thing. I know how this works, and would've not thought into it at 1st until looking around in each folder to double-check, and if not for that would've not noticed at 1st. Smack me on the hand for not double-checking i guess, but i really haven't had this happen before (making a setting, and instead of all 10 folders adhearing to this, 2 of them somehow changed opposite by themselves.)
djdafreund thanks for the insight into something that helped correct your Library issue.
It didn't help me...and to be honest, I hope it's not "true". Having to set a switch for every Season folder in my Library is not something I'm interested in doing. Part of the point of setting content at the TV folder level is to keep the user from having to flip switches in every folder.
-TS
TornSack
2007-10-04, 08:00
I'm not sure if it was clear from my previous post, but I tried djdafreund's recommendation on one of my season folders, and it did not help my particular situation.
-TS
djdafreund
2007-10-04, 08:16
I wasn't saying you HAVE to switch every season folder manually, sorry if there was a missunderstanding. I wanted to point out simply that if you DO run into problems, to double check that the season folders ARE ticked is all, Since i started myself by only unticking the option in the main TV SHOWS folder, and yet somehow 2 tv show SEASONS folders were unticked somehow without my doing. So i reticked them, and rescanned, and viola it was back to normal in my library as well as showing proper Show Info.
Gamester17
2007-10-04, 13:14
IMHO it would be great if someone started a "Regular Expressions (http://xboxmediacenter.com/wiki/index.php?title=Regular_Expression_%28RegEx%29_Tut orial)" article in the XBMC online manual wiki
Nudge nudge, wink wink :;):
IMHO it would be great if someone started a "Regular Expressions (http://xboxmediacenter.com/wiki/index.php?title=Regular_Expressions&action=edit)" article in the XBMC online manual wiki
Nudge nudge, wink wink :;):
http://xboxmediacenter.com/wiki/index.php?title=TV_Shows#Custom_Directory_Structur e_.26_File_Names
???
EDIT: By the way, the "SSEE - Episode Title" (1001 - Blah) format is not a good one to rely on. Once you get a show with more than 99 episodes in a season (there are many), you're screwed. You'll be much happier using a format like "SxxEyy" (S01E01 - Pilot) or "SSxEE" (01x01 - Pilot), since the regex is simpler and ALWAYS accurate.
djdafreund
2007-10-05, 03:41
http://xboxmediacenter.com/wiki/index.php?title=TV_Shows#Custom_Directory_Structur e_.26_File_Names
???
EDIT: By the way, the "SSEE - Episode Title" (1001 - Blah) format is not a good one to rely on. Once you get a show with more than 99 episodes in a season (there are many), you're screwed. You'll be much happier using a format like "SxxEyy" (S01E01 - Pilot) or "SSxEE" (01x01 - Pilot), since the regex is simpler and ALWAYS accurate.
I'm guessing he meant a more elaborate written wiki. A lot of people can read that and still not make sense of that depending on there skill level, or maybe dislexia kicks in and just plain reading TOO much into it.
I only use SSEE, because i don't have any episode's in my collection that won't ever go close to 99 episode's in 1 season. And never will get one with the types of shows i like watching and buying. Only because i only watch weekly shows, and of course wouldn't have that many weeks in 1 season for that to be possible. So i'm not really personally worried about running into that problem with the shows i watch personally. But i have been aware of that problem since the beginning of scrapers when tv shows were 1st added to XBMC.
But, knowing full well of who you are, if you REALLY believe overall that SSxEE format is a much better one (other then just having the 99 episode problem.) to use, i could be talked into changing to that method, if it's more accurate. It's just that so far, I haven't had any problems yet grabbing info (other then the xbmc library settings glitch with 2 folders i mentioned above), but that's not a scrapping issue, that was as it's worth a glitch only. You are the one that has one of the biggest database's, and 100% trust your opinion.
If you'll never hit the 100 episode mark within a single season, there's no reason to switch. The regex is slightly less efficient than the ones with separating characters, but it would only amount to a second or two more while scanning a few thousand episodes.
The thing with regular expressions is that people are much better off just posting for help in here than trying to learn how to write them. It took me a year of working with them regularly to really get them down, and yet I still run into situations where I need to look at a reference. I normally think people should figure it out themselves, but a lot of people are going to have trouble grasping regular expressions and adjusting them as needed.
With the amount of information online about regular expressions, there's no reason to duplicate that amount of information here. Instead, perhaps someone should put a few regex tutorial links into the wiki for people that are looking for more information? Google "regex tutorial" and you'll find a bunch. Here's one of the better ones (based heavily on examples):
http://www.english.uga.edu/humcomp/perl/regex2a.html
djdafreund
2007-10-05, 08:24
Cool. Thanks a bunch for that info, and the link as well. That looks like some good reading info too.
zerospunk
2007-10-05, 11:33
I was hoping if someone would tell me if the default expressions will cover this:
Show Name>Season X>01x01.avi
Would I have to alter anything for this convention?
OKAY SERIOUSLY.
what is unclear about the wiki page. there are examples that describe which filename every single default expression matches.
in addition there are a ton of additionals also with examples.
i'm asking so we can change it to the better.
zerospunk
2007-10-05, 19:00
The phrasing in the wiki is a bit confusing actually.
The defaults will match the following structures/filenames:
foo_[s01]_[e01] foo.1x09* foo.s01.e01, foo.s01_e01 foo.103*
When looking at the examples in 'tvmatching', without knowing what the variables define it's a bit hard to tell what the dir structure should be. I understand that any convention above will work with the file name, I'm just asking if the show name/season name/episode titles are required in the file name if it already has a corresponding number. i.e. show/season _ /01x01.avi
Basically I don't want to go in and add all that redundant info at the file level if it's already picked up in the directory tree, but I'm still unsure after reading the wiki and this thread. Sorry if I'm personally offending you :p (i suck at the expressions)
matt_cyr
2007-10-05, 19:10
The thing the regex looks for is the season/episode numbers in the filename. The rest of the name doesn't make a difference.
foo is a placeholder.
as you can see none of the patterns match your filenames
OKAY SERIOUSLY.
what is unclear about the wiki page. there are examples that describe which filename every single default expression matches.
in addition there are a ton of additionals also with examples.
i'm asking so we can change it to the better.
Let me explain what I found confusing : the fact that there are no complete examples, i.e. containing the folder structure, etc. I think that there is a lot of very useful information in this post, when you explained that the title of the show is actually the folder name under the main folder defined as "TV shows" content, etc.
I could try something up, if you are interested (and also provided I do understand how it is supposed to work :grin:)
V.
I need some help with music videos scraper as I'm really bad with regular expressions. Can someone provide the correct regex for the following format:
Artist\Song.ext
Will be very much appreciated, thanks in advance.
I could try something up, if you are interested (and also provided I do understand how it is supposed to work :grin:)
Err. I mean I could try to write something up, if you are interested.
V.
please do. anything that makes it better and clearer is most welcome.
tcghost; ([^/\]*)[/\](.*)\....
dementio
2007-11-04, 13:26
Can someone help me out? I've tried multiple regexp strings and can't seem to get mine to work.
My TV shows are all in //UNIMATRIX/Tv/ they are all in a directory by show name (e.g. Smallville, Simpsons, etc) with the naming scheme of S##E##.avi
XMBC sees the show titles fine, but it can't find the actual video files in library mode (I can browse to them ust fine.)
dementio
2007-11-04, 23:17
Can someone help me out? I've tried multiple regexp strings and can't seem to get mine to work.
My TV shows are all in //UNIMATRIX/Tv/ they are all in a directory by show name (e.g. Smallville, Simpsons, etc) with the naming scheme of S##E##.avi
XBMC sees the show titles fine, but it can't find the actual video files in library mode (I can browse to them ust fine.)
Oh, almost forgot. Each series is also broken down another directory by season number. An example of a complete path is:
//UNIMATRIX/Tv/Dexter/Season 2/S02E01.avi
Apart from probably posting when I should have been able to figure it out myself, I'm wondering what I'm doing wrong.
My HTPC has TV shows stored in the following format:
\TVShow\Season xx\01 - EpisodeName.avi
And I can't seem to get a regular expression that works properly.
I've followed the instructions on wiki as closely as I can, but I'm not the brightest match in the box. :)
Can anyone help?
have you guys seen the examples here:
http://xboxmediacenter.com/wiki/index.php?title=TV_Shows#TV_show_file_naming_conve ntions
raymondh
2007-11-09, 18:40
have you guys seen the examples here:
http://xboxmediacenter.com/wiki/index.php?title=TV_Shows#TV_show_file_naming_conve ntions
I have. I followed this one:
\Season #\## (Season# is at very end of directory name, and filename starts with episode name, neither have to be a specific number of digits) :
<tvshowmatching>
<regexp>Season[\._ ]([0-9]+)[\\/]([0-9]+)[^\\/]*</regexp>
</tvshowmatching>
Example : \Battlestar Galactica\Season 3\01 - Occupation.avi (Season 3, Episode 1)
And the banner shows up at the top most directory level but inside that folder (where is lists the seasons) it shows a banner for a show called Dark Season and nothing inside there.
jmarshall
2007-11-09, 23:23
Set Content on the folder containing Battlestar Galactica. It will then find the folder "Battlestar Galactica" and use that as the TV show name. If you set content on the "Battlestar Galactica" folder, it will use the "Season x" folder for the TV show name (thus choosing "Dark Season".
Delete your thumb cache if you are in files view and you have wrong thumbs.
Calmiche
2007-12-11, 01:06
Err.. I can't seem to find my exact one, and I don't seem to be able to grasp Regular Expression. Can someone check my work?
I use:
\Network share\TV\Show Name\Season ##\s##(season)e##(episode) Episode Name.XXX
So:
\Good Eats\Season 06\s06e09 Chops Ahoy.avi
From what I get of Regular expression (And I'm a noob), I should be using something like this:
<tvshowmatching>
<regexp>Season[0]*[\._ ]s([0-9]+)[0]*([0-9]+)e[0]*([0-9]+)[^\\/]*</regexp>
</tvshowmatching>
My understanding is that this will take the season, with the number, delete any leading 0's, move onto the episode season (s) and episode number, seperated by an e, again stripping leading 0's, then ignore any extra names like the episode name. Right? Or did I screw it up?
jmarshall
2007-12-11, 01:16
You screwed up, yes. The good news is that the default regexps (as of a couple of days ago) will handle your filename setup as-is.
Cheers,
Jonathan
Calmiche
2007-12-11, 01:27
Heh. Thanks, I guess. I've got a build from Dec 04, 2007. Guess I need a newer one.
After going through the same problems many people seem to be having here, I took a step back and relooked at the problems and what experienced users were saying.
Basically I had taken a lot of time to organise my collection all with the same layout, eg
root\Title\Series 1\Title.s01.e01.avi
From the replies I have looked at, all the default settings should pickup this (and many similar variations) without the use of advancedsettings.xml
I therefore deleted advancedsettings.xml, and UserData\Database\MyVideos*.db files (you might need to set Video-Library to not enabled to delete the latter), to start afresh.
Then restarted my XBox to refresh the configuration.
Firstly re-enable the library from Settings-Video-Library-Enable Library
Go to your Video Root which should display all you folders containing either files or Series folders with files in.
On each folder in the root (not the serier folders) bring up the Context Menu and select "Set Content"
Change it to say the directory cotains TV Shows and click OK (leaving "Run automated Scan" unchecked). You should finish back at the root screen.
Then open the Contect Menu again and select "TV Show Infrmation". A screen will appear, select the correct TV Show from the list and if all is well the directory will then be scanned and a TV show Information Screen will appear. Success!!!
You can then go into the folder and the Series Folders (if applicable) and hitting Info when on a file name will bring up the episode information.
Hope this helps people who appear to be struggling in tackling a problem in what I think is the wrong way.
Pr.Sinister
2008-07-03, 11:48
Hi there...
I have the following in my advancedsettings.xml file :
<tvshowmatching action="append">
<regexp>[\._ \-]\(([0-9]+)x([0-9]+)\)[^\\/]*</regexp> % foo.(1x09)*
<twopart>
<regexp>[\._ \-]\([0-9]+x[0-9]+[\._ \-]*([0-9]+)\)[^\\/]*</regexp> % foo.1x09 1x10
</twopart>
</tvshowmatching>
This was working fine with a late 2007-early 2008 build (can't remember what i had) but i just upgraded to the June 30th T3CH build to use the latest Vision2 and Aeon skins and this no longer works for me.
My TV Shows are in this format :
TV Shows (Source)\Seinfeld\Season 1\Seinfeld-(1x01)-Pilot.avi
I was able to scan all my TV Shows lie this previously but i just made the mistake of deleting my library and do a total rescan so i could get the FanArt and episode thumbnails but now i am SOL.
Is this a bug or have they changed the way the <tvshowmatching> tag works?
Any help is appreciated.
-Pr.
Pr.Sinister
2008-07-03, 12:16
Nevermind...
I found the problem...
I did not have the <advancedsettings> tag in my advancedsettings.xml file.
In my defense, it worked without it on that older build i had :D
-Pr.
I doubt that. The "advancedsettings" opening tag has always been required. The "action" parameter is brand new, added about a week ago. And there is no custom "twopart" regexp.
Pr.Sinister
2008-07-03, 22:29
I doubt that. The "advancedsettings" opening tag has always been required. The "action" parameter is brand new, added about a week ago. And there is no custom "twopart" regexp.
Yes the "action" parameter i changed it to many things while troubleshooting.
I had it as append="yes" before.
As for the <twopart>, that was taken from the online manual months ago.
It may have been removed since then but it was a documented feature at some point. Other users reference it in this very thread so we didn't just pull
it out of thin air. A quick scan shows at least these 2 posts : This one (http://xbmc.org/forum/showpost.php?p=129561&postcount=24) & This one (http://xbmc.org/forum/showpost.php?p=129741&postcount=25)
I always keep my UserData folder and my advancedsettings.xml was dated
October 2007 and my TV Shows were added to the library no problem without
that tag. It may have been a bug but i am not lying when i say i didn't have it
in my file.
I am a savvy user and have been using XBMC since it was XBMP and if i messed up, i have no problem admitting my mistakes. I do it a work where it matters so why not do it in cyberspace where nobody knows me for real? I have absolutely nothing to gain by lying...
I'm sorry if this is not what you meant but the way i took it is that i was lying when i said it worked without the tag before. I deal with users everyday that tell me they didn't change anything on their computer or software config and that it suddenly doesn't work. 99% of the time, they are full of it and that pisses me off but there is the odd 1% that truly didn't change anything and it is something on one of my servers that messed them up or something i changed on the backend.
Anyway... I am ranting... sorry...
-Pr.
I am very surprised it worked without the advancedsettings tag missing. It's the root tag. If that's missing everything gets ignored.
bartdesign
2008-07-04, 02:20
I don't know if the link was already posted but for people that are experimenting with RegEx'es this will come in handy. It's an online expression test tool. I use it regularly to see if my regular expresions work out the way they are supposed to.
http://gskinner.com/RegExr/
I'm not sure if this question has been answered. But I've got all my TV-shows in rar-files like this.
\Tv Shows\Heroes.S02\Heroes.S02E01.HR.HDTV.XViD-YesTV\heroes.0201.hr-yestv.rar
\Tv Shows\Heroes.S02\Heroes.S02E01.HR.HDTV.XViD-YesTV\heroes.0201.hr-yestv.r01
\Tv Shows\Heroes.S02\Heroes.S02E01.HR.HDTV.XViD-YesTV\heroes.0201.hr-yestv.r[dd]
\Tv Shows\Heroes.S02\Heroes.S02E01.HR.HDTV.XViD-YesTV\heroes.0201.hr-yestv.r47
\Tv Shows\Heroes.S02\Heroes.S02E01.HR.HDTV.XViD-YesTV\heroes.0201.hr-yestv.r48
Can XBMC recognize this structure?
jmarshall
2008-07-16, 10:12
Yes. Enable transparent rars.
Yes. Enable transparent rars.
Where is that setting?
its in the same menu as "hide parent item" and "hide media extensions". settings -> view options? or something like that.
Hi, first off I'm sorry that I've had to come post in search of salvation...:blush:
My TV shows are stored on my xbox in this file structure:
TV Shows\Show\Season x\SEE - Episode
eg TV Shows\Family Guy\Season 1\101 - Death Has A Shadow.avi
I was having no luck getting episodes picked up in the search but was able to pick up the shows and I then could see the shows in the library (but no episodes).
After trying this example from the wiki I was able to pick up some shows:
<advancedsettings>
<tvshowmatching>
<regexp>([0-9]+)([0-9][0-9])[^\\/]*</regexp>
</tvshowmatching>
</advancedsettings>
But the majority of shows were incorrect or missing so I tried some other things. After reading this thread I decided that I should re-evaluate my naming structure to have the file names as s1e01 - Death Has a Shadow.avi because this should prevent any confusion with season numbers etc. I'd be willing to change all my files if it worked but at the moment with the above example as a test the scan picks it up as One Piece (http://epguides.com/OnePiece/) ???
My question is what regexp would work for my existing file structure or how do I get the correct tv show information to be picked up if I opt to rename my files s1e01 etc?
Thanks in advance and once again I'm sorry for asking what is probably a simple question. I am thoroughly prepared to look like a muppet when the simple soloution is pointed out to me:oo:
I have the exact structure as you, except with my files renamed as S01E01 - EpName.avi. The default regular expressions will work for that as long as you Set Content on the "TV Shows" level. Make sure you use TheTVDB.com scraper, since we're cool and all. ;)
stanley87
2008-08-26, 13:21
Does the TVDB scraper ignore leading zeros in episodes?
I noticed that all the ep's on TVDB are 1, 2, 3, 4
Where as i like mine: 01, 02, 03, 04
im using: <regexp>Season[\._ ]([0-9]+)[\\/]([0-9]+)[^\\/]*</regexp>
Family Guy/Season 2/02 - Holy Crap.avi
stanley87
2008-08-26, 22:45
Also, can anyone tell me how season thumbs etc are located.
At the moment i have this structure:
Family Guy/folder.jpg (main wide icon for family guy)
Family Guy/Season 1/folder.jpg (icon for that season)
Family Guy/Season 1/01 - Foo.tbn (icon for that episode)
im not sure, but i think season thumbs can only be scraped. and i believe the show thumb is gotten as the folder.jpg within the named tv show folder.
(and your filesystem structure is not supported by default. do you have a custom regexp defined to support it?)
stanley87
2008-08-27, 01:32
im using: <regexp>Season[\._ ]([0-9]+)[\\/]([0-9]+)[^\\/]*</regexp>
Family Guy/Season 2/02 - Holy Crap.avi
stanley87
2008-08-27, 01:34
You can manually select season thumbs.
I think it should be built in tho to look for folder.jpg within the season folder
or look for season 1.jpg in the main tv show folder eg:
TV/Family Guy/folder.jpg (main show icon)
TV/Family Guy/season 1.jpg (season 1 thumb)
or:
TV/Family Guy/folder.jpg (main show icon)
TV/Family Guy/Season 1/folder.jpg (season thumb)
then for episode thumbs, keep the .tbn's :-)
The 2nd way would be good so i get the nice lil icons on the folders when browsing my NAS via windows
a "season folder" is not required, and is honestly meaningless. xbmc doesnt care about the folders in between the tv show named folder, and the files. there can be anything in between such as this:
\tvshows\family guy\foo\bar\bat\baz\xxx\yyy\zzz\file.s01e01.avi
though, looking for "season_#.jpg" or something along those lines directly beneath the folder used for the show name would work. feel free to submit a patch.
(and yes, you can manually set the thumb, but it is manual.)
stanley87
2008-08-27, 04:05
Cool, been awhile since I made a patch for xbmc.. think it was the additem(pos) thing...
Will have a look tho :-)
Oh, i had regex, can you confirm that:
<regexp>Season[\._ ]([0-9]+)[\\/]([0-9]+)[^\\/]*</regexp>
Family Guy/Season 2/02 - Holy Crap.avi
should work....
that looks about right... there are many free pcre based graphical regexp testers that you can download. one that i've used in the past is regexp coach. google. you'll find a bunch. give them a try. there's also some that are purely online.
stanley87
2008-08-27, 06:15
Sounds great!
Thanks for the help.
Stay off the Kraqh!
/show/season1.tbn
/show/season2.tbn
...
for local season thumbs
http://xbmc.org/wiki/?title=Thumbnails#Examples_for_User-Defined_Thumbnails:
stanley87
2008-08-28, 01:09
Ok, my TV shows all add fine APART from:
Episode 1 of Trailer Park Boys Season 1
Epidode 1 or Trailer Park Boys Season 2
But, episode 1 of seasons 3 and 4 work fine.
See my previouse posts for my regex and file structure.
Only TPB does this.
Maybe an issue with www.thetvdb.com (scraper i use is this)
debug log. and make sure you add a dummy file so that you override the content hash.
stanley87
2008-08-28, 03:42
debug log. and make sure you add a dummy file so that you override the content hash.
I will just copy my db's and then delete them.
Then just add in Trailer Park Boys FRESH.
I will set the debug log level to 3.
And post the log when I get home from work.
I did not know that XBMC outputed to the log when loading the library!
Cool!
you dont need loglevel 3. loglevel 1 is plenty. and yes, xbmc produces a ton of debugging output because otherwise it would be impossible to help users :)
** edit **
i'm making that change for the 1x01 default regexp so that it'll match as the start of a filename, right now before i forget!
** edit **
done... its now in svn. (i didnt make the change for "111" to match as the beginning of a filename because of jmarshalls observation that it could screw up things like "4400.s01e01.avi". technically it wouldn't as the s01e01 regexp is evaluated first, but i didnt want to take the chance of some other accidental matches.)
stanley87
2008-08-28, 06:08
Ok, can someone please just post, the BEST MOST ACCURATE FULL PROOF REGEX and a good example of file structure so I can change to it :-D
Or, even a good example of the new Current default regex.
jmarshall
2008-08-28, 06:13
If you use:
1x02foo.avi you won't have a problem with current (as in what kraqh3d just committed)
Alternatively, s01e01foo.avi will be fine as well.
Basically, anything that has a simple, easy to differentiate season and episode number is fine to use.
stanley87
2008-08-28, 10:34
ok, i take it you can also have:
1x02 - episode name.avi
jmarshall
2008-08-28, 10:49
indeed - we do not care what comes after the season + episode identifier in this case.
stanley87
2008-08-28, 11:18
I found my problem and a possible bug in xbmc at the same time
The two ep's that wouldnt add:
Trailer Park Boys
Season 1 - Episode 1
NAME: Season 1/01 - Take Your Little Gun and Get Out of My Trailer Park.avi
Season 2 - Episode 1
NAME: Season 2/01 - What in the Fuck Happened to Our Trailer Park.avi
I renamed my avi's just to : 01.avi for both seasons and they add in fine..
hmmm, so something in the name of my .avi is causing the issues.
So, i looked what is common....
The words "TRAILER PARK"
so, i tried removing each word, if i remove just PARK, still no go.
But as soon as i remove the word TRAILER from my filename, it adds fine.
So, somehow XBMC is not importing an episode with the show name in it...
Any thoughts????
stanley87
2008-08-28, 11:21
But, with just PARK in the name, still adds.
So, it must be only if the first word of the Show name is in the episode name....
But, then, wouldnt heaps of people have issues apart from me...eg:
THE office
01 - foo THE foo.avi
and it would fail... i might do some more investigating :-)
It might only do it for episodes 1, will try to rename my episode 2 and see what happens..
OK.
Just tried and it failed to import Episode 2 if i had TRAILER in the filename...
But, then i looked at my other tv shows.
The Office
Has a episode with THE in it and it still adds... maybe the scraper or whatever ignores "THE".....
for now i have just changed "trailer" 2 "traile-r" and all works fine.
jmarshall
2008-08-28, 12:15
It's due to the word trailer. We ignore all trailers, after all.
This obviously needs a rethink with respect to tvshow scanning!
Cheers,
Jonathan
i could've sworn that we checked for "-trailer" not just the bareword. maybe thats only for the trailer matching.
stanley87
2008-08-29, 00:56
oh, understood.
Quite funny how i thought it was due to the tv show name but it would of been the same with any show..
it is separated but spaces are included. for anyone interested, the regexp is "[-\._ ]sample|trailer[-\._ ]"
in this case, the "space" "Trailer" "space" matches. You have a few renaming options...
- remove the preceeding "The" so the start of the filename is Trailer. this is probably the best option.
- combined Trailer + Park into TrailerPark but I dont know how well that will work
- use another character in between Trailer and Park thats not - . _ or space.
jmarshall
2008-08-30, 00:09
This needs to either be configurable or re-thought. It seems like it's too general to me. Perhaps we can restrict to sample/trailer at the end of the filename? Even so, I'm sure there are valid movies or shows ending in "Trailer" or "Sample".
Cheers,
Jonathan
we only match trailers as "-trailer" for the purposes of tagging database items with local trailers. if we use that convention then the regexp should be something like this
(-trailer)|([ \.-_]sample[ \.-_])
jmarshall
2008-09-02, 23:32
Sounds good.
shall i? i can bundle this into other changes i have for the scanner cpp file. its easy enough to change back later if necessary so that it doesnt need to be an atomic change by itself.
douginoz
2008-09-29, 04:57
and so this thread continues, unabated. But this time, I've read the FAQs, this entire thread, and many, many other pages.
I've installed xbmc on my PC running XP with all defaults.
My tv shows are in the format m:\tv\showname\season 01\01 - blah.avi
I have created a file called advancedsettings.xml in c:\Program Files\XBMC\userdata
The contents of that file are:
<advancedsettings>
<tvshowmatching>
<regexp>Season ([0-9]+)[\\/]([0-9]+) - [^\\/]*</regexp>
</tvshowmatching>
</advancedsettings>
I have deleted the MyVideos34 file and restarted xbmc and cleared the Video library and re-run the scan. I've done this so many times over the past week that I'm numb.
I have checked the syntax of the advancedsettings.xml file over 50 times.
I have checked that the file is in the location I specified above. The case is exactly as I have indicated. The contents are a cut and paste.
I have changed the regex to many different varieties, and checked each one using the website www.regexchecker.com. They always work.
And yet....
The xbmc log clearly shows that it is not even trying to use my regex. It appears to be ignoring my advancedsettings.xml file completely.
There are many, many MANY suggestions in this thread on the content of advancedsettings.xml, but almost none confirm where EXACTLY it's supposed to be. It >is< supposed to be in c:\program files\xbmc\userdata, right?
Is there anywhere within xbmc that you can tell it otherwise, or tell it to use/not use advancedsettings? Is there some debug mode that you can set to have it indicate that it is using advancedsettings.xml?
Here, as proof, is a small extract of my log:
11:40:26 T:788 M:441769984 DEBUG: running expression \[[Ss]([0-9]+)\]_\[[Ee]([0-9]+)\]?([^\\/]*)$ on label m:\tv\30 rock\season 01\1 - pilot.avi
11:40:26 T:788 M:441769984 DEBUG: running expression [\\/\._ \[-]([0-9]+)x([0-9]+)([^\\/]*)$ on label m:\tv\30 rock\season 01\1 - pilot.avi
11:40:26 T:788 M:441769984 DEBUG: running expression [Ss]([0-9]+)[\.-]?[Ee]([0-9]+)([^\\/]*)$ on label m:\tv\30 rock\season 01\1 - pilot.avi
11:40:26 T:788 M:441769984 DEBUG: running expression [\._ -]([0-9]+)([0-9][0-9])([\._ -][^\\/]*)$ on label m:\tv\30 rock\season 01\1 - pilot.avi
11:40:26 T:788 M:441769984 DEBUG: could not enumerate file M:\TV\30 Rock\Season 01\1 - Pilot.avi
I have gone, and shall remain,
temporarily insane.
douginoz
2008-09-29, 05:17
Paradise Regained.
Handy tip: Put the advancedsettings.xml in
c:\documents and settings\<login>\Application Data\XBMC\UserData
Thank you, thank you, thank you
Narfotic
2008-10-05, 19:15
Can anyone help me modify the expression to match this:
example...
The Sopranos/S01/The Sopranos S01 E01.avi
Been trying to do it myself, but can't seem to get it to work...
Thanks in advance.
ssboisen
2008-10-20, 12:33
Can anyone help me modify the expression to match this:
example...
The Sopranos/S01/The Sopranos S01 E01.avi
Been trying to do it myself, but can't seem to get it to work...
Thanks in advance.
Try this one
S([0-9]+)[^\\/]*
I would like some help with my config to match this:
TV/Name.S05E01.DSR.XviD-GROUP/
or
TV/Season 05/Name.S05E01.DSR.XviD-GROUP/
jmarshall
2008-10-22, 05:55
Welcome to the forums Valpen.
Said naming is supported by default if it's part of the filename, though you appear to have individual files in separate folders? What are the filenames called?
Welcome to the forums Valpen.
Said naming is supported by default if it's part of the filename, though you appear to have individual files in separate folders? What are the filenames called?
Thx. :)
It's RAR archives.
TV/Name.S05E01.DSR.XviD-GROUP/*.rar
jmarshall
2008-10-22, 06:49
If you have transparent rar's enabled it may work out of the box, but it would depend on what they're named.
It dont. I tried that already. Tha filenames can be pretty mutch anything.
jmarshall
2008-10-22, 08:20
You might have to alter the regexp so that the / and \\ are ignored, so that it takes the season and episode numbers from the folder names.
Cheers,
Jonathan
How do I do that? I'm a complete newbie at this. :)
Hi, I have now browsed this forum, wiki and all over internet for answer the same issue than Valpen has.
My directory structure is:
TVSeries
-SeriesX.S12E10.DSR.XviD-0TV
--SeriesX.s12e10.dsr.xvid-0tv.avi
-SeriesY.S02E03.HDTV.XviD-XOR
--SeriesY.s02e03.hdtv.xvid-xor.avi
All my series are downloaded to this TVSeries -folder without any further moving to different folder and i delete those when i have watched them. I dont keep my xbox on all the time, so every time i watch something i put it on and my library is updated.
Tried to figure out how to form proper scraper, but i cant figure it out and if someone has solution it would be great.. Tho i think that i need to start debugging my xbmc and start to read what logs says about that.
This is great forum and here is tons of useful stuff.. good community going on here thanks for that.
Unfortunately I must join the crowd not getting these things to work at all. I've spent a couple of days with the tutorials, read the entire thread, tried various tricks, but nothing seems to work.
Examples of my filing system:
\Sopranos s1\The Sopranos - 105 - College.avi
\Rome\Rome - 101- The Stolen Eagle.avi
So, \series (with or without s+season#)\series - s#e## - episode name.avi
From what I've gathered, this SHOULD do the trick:
<tvshowmatching>
<regexp>([0-9]+)([0-9][0-9])[^\\/]*</regexp>
</tvshowmatching>
(and yes, <advancedsettings> is included).
However, nothing turns up in any scans. Though I have a feeling there must be something I've overlooked and haven't noticed anywhere. Just for a test I tried renaming some of my stuff according to formulas supported by default, and scans still wouldn't find anything.
Any ideas appreciated.
try using <tvshowmatching action="append">.
So it will look like:
<advancedsettings>
<tvshowmatching action="append">
<regexp>([0-9]+)([0-9][0-9])[^\\/]*</regexp>
</tvshowmatching>
</advancedsettings>
my directory structure and file naming is:
\TV Shows\[TV_Show_name]\Season [Season_Number]\[TV_Show_name] - [Ss][Season_Number][Ee][Episode_Number] [Other_stuff].ext
example:
1. \TV Shows\Battlestar Galactica 2003\Season 4\Battlestar Galactica - s04e09 [720p.HDTV.x264] [2HD].mkv
2. \TV Shows\STAR WARS The Clone Wars\Season 1\STAR WARS the Clone Wars - S01E10 - The Lair of General Grievous.mkv
I tried the following expression but it doesn't work.
<advancedsettings>
<tvshowmatching>
<regexp>Season[\._ ]([0-9]+) - [Ss]([0-9]+)[Ee]([0-9]+)[^\\/]*</regexp>
</tvshowmatching>
</advancedsettings>
I don't know what's wrong. Please help me. I'm willing to make small adjustments to the way I name my files (spacing, case, order) but I need all the components because if I forgot where I put the file at some point it is nice to be able to search tor it.
Thanks.
both of those examples works just fine with the standard expressions. no reason to customize anything
zaphodmcmillan
2009-01-08, 17:01
I am trying to get XBMC to pick up the tv shows that itunes stores (don't ask, just at the moment I am happy having itunes storing them) However I also love the XBMC interface/networking
I have the tv shows stored in folders for each show. XBMC picks these up fine. Then the files are saved as S-EE episode name.mp4 (note these arn't protected files) eg 1-07 Awkward Phase.mp4
I have created a regexp for the advance settings.xml file
([0-9]+)-([0-9]+)[^\\/]*
to try and get it to pick them up. However at best it picks up the first episode of a season up only.
What am I doing wrong?
jessicah
2009-01-09, 05:17
I have structure like:
TV\Heroes\Heroes.S01E01.HDTV.XviD-LOL.avi where TV is the added source.
When I right click Heroes > TV Show Information, I get a dialog asking to set title, which has defaulted to Heroes. I click Done, and this just pops up repeatedly until I manage to cancel out of it, and I don't get anything added to library (it's disabled since nothing in it).
Thanks,
Jessica
This is driving me crazy, please someone help me...
I have the structure as
\Ice Road Truckers\Season 1\ice.road.truckers.s01e01.avi
\Greys Anatomy\Season 5\Greys Anatomy - S05E03 - Here Comes The Flood HDTV XviD DOT.avi
My advancedsettings.xml is like this (but I know It's not needed)
<advancedsettings>
<tvshowmatching>
<regexp>[Ss](\d+)[Ee](\d+)</regexp>
</tvshowmatching>
<loglevel>1</loglevel>
</advancedsettings>
The series appears in the library but without episodes. My log is here http://pastebin.com/m726c51b0
dc_williamson
2009-06-07, 16:03
Hello all... so, before I post details of my directory structure and log file, with the various regexp strings I've been playing with (and failed to make work :) and pleas for assistance can I ask, where should advancedsettings.xml go? And just to complicate things, I'm running Windows 7 RC1...
Right now I see this in the log file:
NOTICE: special://masterprofile/ is mapped to: C:\Users\David\AppData\Roaming\XBMC\userdata
blah
NOTICE: special://profile/ is mapped to: special://masterprofile/
blah
NOTICE: Loaded advancedsettings.xml from special://profile/advancedsettings.xml
...and my advancedsettings.xml file is in that location (along with other various .xml files).
So all good, yes?
Thanks in advance,
Temporarily Insane #2
I thought I had a handle on my regex statement, but I am running into a wall.
My directory structure is as follows:
TV Series/Series Name/Series Name - S#xE# - Episode Name.avi
TV Series/Smallville/Smallville - 6x01 - Zod.avi
TV Series/Hung/Hung 02 - Great Sausage or Can I Call You Dick.avi
I thought this would work for me, but so far no go,
<advancedsettings>
<tvshowmatching>
<regexp>[^\/]* [0]*([0-9]+)[xX][0]*([0-9]+)[^\/]*</regexp>
</tvshowmatching>
</advancedsettings>
So where am I going wrong? Any pointers would be greatly appreciated!