Expressions/Rules requests (1 Viewer)

Jarritos

Portal Member
October 11, 2006
25
1
44
Hey,

I was wondering if there was an expression so I can add tv shows that have series/season/1X01 - name of episode
 

Karyudo

Portal Member
January 26, 2008
28
1
Home Country
Canada Canada
My first post on the MP Forums...

I have a lot of eps that don't get parsed right, but instead of asking for help right away, I thought I'd give writing some regex a try.

I found pretty quickly that regex is pretty difficult to parse if you're not a computer. So I looked for a good editor. I found Expresso (http://www.ultrapico.com/Expresso.htm), which is free, and seems to parse the sort of regex that gets used in TVSeries.

I have a bunch of files of the form:

W:\Torrents\Arrested Development\Season 1\Arrested Development - S1 E 19 - Best: Man, for the 'Gob'.avi

For which I wrote:
Code:
(?<series>[\w \.,'\:&\-\)\(]*).-..(?<season>[0-9 ]{1,2})..?(?<episode>[0-9 ]{1,2}).-.(?<title>[\w \.:',&\-\(\)]*)\.(?<ext>[^\\]{0,3})$

Might not be the most elegant or compact or flexible regular expression ever written, but I'm thinkin' it's not too bad for somebody who didn't even know what regex was until this past Tuesday!

Now I have to see if it will actually work in MP TVSeries like it does in Expresso...
 

mascot4hire

New Member
February 2, 2008
3
0
Home Country
Hi,
Just got mediaportal and this plugin and love it.
I'm having alot of trouble parsing my files though i've been reading up on regex but can't seem to make sense of it and all the simple expressions if tried to make don't work. my files are named like this.
Z:\TV Shows\Entourage\Season 1\104 - Date Night.avi
the 1 in the filename meaning season 1 and 04 the episode number.
I think someone else here had the same naming system but didn't get a response.
anyway thanks in advance.
 

Karyudo

Portal Member
January 26, 2008
28
1
Home Country
Canada Canada
Z:\TV Shows\Entourage\Season 1\104 - Date Night.avi
the 1 in the filename meaning season 1 and 04 the episode number.

First of all, I'd recommend getting a regex editor. There's no way I could write anything without one (yet). It'd be like being Neo in the dojo without Morpheus. You ain't gonna get to be Flying, A55-Kicking, Smith-Fighting Neo without a Morpheus in your corner to help you out. So go get Expresso (it's free!) and start with the tutorials. Or grab a regex that works and some sample text (i.e. a filename) it's known to work on, and use Expresso to figure out how and why it works!

Having said that, this should work for your filenames:
Code:
(?<series>[\w .,'!&$]*)\\[\w\s0-9]*\\(?<season>[0-9]{1})(?<episode>[0-9]{2}).{3}(?<title>[\w .,'!&$]*)\.

Again, it might not be very elegant, but this is my third-ever attempt at writing regex.

This is not hard-coded for Entourage. It also doesn't use the "Season 1" foldername to get the season; it uses the filename. And it ignores everything upstream of the "Series" foldername.

(P.S. If this does work for you, please add it to the "Expressions/Rules Exchange" thread, so other people can use it, too!)
 

LXTR

Portal Pro
November 27, 2007
86
0
Home Country
Spain Spain
How to show a logo when you have a completed/non completed season?

I suppose it is not possible...

Is there any way to show a logo when you've got all the episodes of a season, and another one when you have some episodes to download yet?
 

Beavis

Portal Member
February 13, 2008
37
0
Schortens
Home Country
Germany Germany
i think i am to stupid for this, i have some anime series named like

x:\Angelic.Layer\Angelic.Layer - 01.avi

and i didnt get it to work, im really so stupid ?
 

ltfearme

Community Plugin Dev
  • Premium Supporter
  • June 10, 2007
    6,751
    7,196
    Sydney
    Home Country
    Australia Australia
    Ensure you have both the season and episode defined:

    x:\Angelic.Layer\Angelic.Layer - 101.avi
     

    venares

    Portal Member
    November 7, 2007
    23
    3
    Home Country
    United Kingdom United Kingdom
    i think i am to stupid for this, i have some anime series named like

    x:\Angelic.Layer\Angelic.Layer - 01.avi

    and i didnt get it to work, im really so stupid ?

    Fairly easy one this.
    First you need to put all your episodes in a folder called "Season 01" then add this expression.
    Regular Expression "Season <season>\<series> - <episode>.<ext>"
    So you would end up with "x:\Angelic Layer\Season 01\Angelic.Layer - 01.avi" as your path.
    Just tried it and passed fine. :D
    The problem with most Anime release groups is that they don't stick to any standard naming convention, so you end up with the parser throwing a fit because it cant pull out a season number from the file name.
    Putting all you episodes in a folder called "Season 01" and then using the above expression solves this problem by pulling the season number from the folder name.
     

    Users who are viewing this thread

    Top Bottom