Kodi Community Forum
Regular Expressions - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: OS independent / Other (https://forum.kodi.tv/forumdisplay.php?fid=228)
+---- Thread: Regular Expressions (/showthread.php?tid=25349)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17


- matt_cyr - 2007-10-05

The thing the regex looks for is the season/episode numbers in the filename. The rest of the name doesn't make a difference.


- spiff - 2007-10-06

foo is a placeholder.

as you can see none of the patterns match your filenames


- VTurn - 2007-10-16

spiff Wrote: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 Big Grin)

V.


- tcghost - 2007-10-17

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.


- VTurn - 2007-10-17

VTurn Wrote:I could try something up, if you are interested (and also provided I do understand how it is supposed to work Big Grin)
Err. I mean I could try to write something up, if you are interested.

V.


- spiff - 2007-10-17

please do. anything that makes it better and clearer is most welcome.

tcghost; ([^/\]*)[/\](.*)\....


- dementio - 2007-11-04

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

dementio Wrote: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


Am I doing something wrong with regexp? - User 29005 - 2007-11-09

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. Smile
Can anyone help?


- SleepyP - 2007-11-09

have you guys seen the examples here:
http://xboxmediacenter.com/wiki/index.php?title=TV_Shows#TV_show_file_naming_conventions


- raymondh - 2007-11-09

SleepyP Wrote:have you guys seen the examples here:
http://xboxmediacenter.com/wiki/index.php?title=TV_Shows#TV_show_file_naming_conventions

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

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

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

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

Heh. Thanks, I guess. I've got a build from Dec 04, 2007. Guess I need a newer one.