Expressions/Rules requests (4 Viewers)

rockplus

New Member
September 14, 2009
4
0
AW: Expressions/Rules requests

sukkubus try this


Code:
(?<series>[^\\$]+)(?:(?:\\(?:Season|Staffel|S[eé]ries?)?[ .-]?[0-2]?[0-9])?\\s?(?<season>[0-2]?[0-9])|\\(?:(?:Season|Staffel|S[eé]ries?)[ .-])?(?<season>[0-2]?[0-9])\\[^\\]*?)[ex]?(?<episode>\d\d+)(?:[ .+-]e?(?<episode2>\d\d+))?(?:[ -]+(?<title>(?![^\\]*?sample)[^$]*?))?\.(?<ext>[^.]*)$
the second number of the Episode 10 is a 0 and you test if the second is in range of [1-9]. That is why the regex fails .
Hope this helps !
 

JimmyBoy

Portal Pro
April 18, 2008
107
8
Home Country
United Kingdom United Kingdom
Hi,

I (like others too, it seems) have some problems with sample folders/files.

Here are some examples ;


Z:\Media\TV Series\Ideal Series 6\Ideal.6x08.The_Housewarming.WS_PDTV_XviD-FoV\Sample\ideal.6x08.the_housewarming.ws_pdtv_xvid-sample-fov.avi
Z:\Media\TV Series\Ideal Series 5\Ideal.S05E05.WS.PDTV.XviD-RiVER\Sample\ideal.s05e05.ws.pdtv.xvid-river.sample.avi
Y:\TV Series\This Is England 86 Series 1\This.Is.England.86.S01E04.DVDRip.XviD-aAF\Sample\aaf-tie86.s01e04.dvdrip.xvid.sample.avi
Y:\TV Series\The Simpsons\The.Simpsons.S14E18.Dude.Wheres.My.Ranch-FTV\Sample\the.simpsons.s14e18.dude.wheres.my.ranch.sample-ftv.mpg
Y:\TV Series\Destroyed.In.Seconds.S01.DVDRip.XviD-TTi\Destroyed.In.Seconds.S01E12.DVDRip.XviD-WiDE\Sample\destroyed.in.seconds.s01e12.dvdrip.xvid-wide.sample.avi
Y:\TV Series\Bo.Selecta\Bo.Selecta.S01E02.DVDRip.XviD-SFM\Sample\bo.selecta.s01.e02.dvdrip.xvid.sample-sfm.avi

This is with standard filters supplied (After a "Reset"), I have tried going through one-by-one on the filters to see if they are providing any false-positives, but none that I could see. This is using version 3.1.2.1881 of TV-Series.

Secondly, when you run the importer and right click on a "bad" entry, it shows you the file path+name - it would of been so nice if I could of copied that to the clipboard so I could post them here, instead I had a lot of fun and games in explorer finding the files and then getting there paths+names on to the clipboard!! haha

Third, is there anywhere that explains (reasonablly easily) regexp's, or any software to use to text these expressions, as im having a hard time getting my head around the syntax.
 

Hudzy

Portal Member
July 5, 2009
8
0
Home Country
United Kingdom United Kingdom
Can anyone help me update my regex?

(?<series>[\w .,'!&$]*)\\[\w\s0-9]*\\(?<season>[0-9]{1,2})(?<episode>[0-9]{2})(?(?=[-])-(?<episode2>[0-9]{2})).{1}(?<title>[\w .,'!&$]*)\.

Currently it reads my folder structure, which is as follows:

Series\Season 1\101 Episode
Series\Season 1\102-03 Episode

That's just fine, but now I'm having trouble with episode names with hyphens. They don't parse properly so I set up a string replacement to get rid of them, forgetting it would mess with my double episodes.

I need to ignore hyphens in the title using the expression.
 

RoChess

Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,434
    1,897
    I need to ignore hyphens in the title using the expression.

    Not ignore you need to allow the title to contain the character:

    (?<series>[\w .,'!&$]*)\\[\w\s0-9]*\\(?<season>[0-9]{1,2})(?<episode>[0-9]{2})(?(?=[-])-(?<episode2>[0-9]{2})).{1}(?<title>[\w -.,'!&$]*)\.

    PS: Really weird way to use RegExp, but if it works for you, enjoy it :cool:
     

    dermosi

    New Member
    October 9, 2010
    1
    0
    Home Country
    Germany Germany
    Hi,

    I have been trying now for several hours to get the plugin to work with my series. I tought I have a rather simple and uniform naming structure, but it does not recognize any of my files.

    My structure looks like that:
    \series\babylon 5\season 1 (DVD)\s01e01.001 ragesh 3\video_ts... for ripped dvds
    \series\futurama\season 1\s01.e05.005 fear of a bot planet.avi for single files.

    for ripped dvds, I have each episode in a single folder with the respective subfolders (audio_ts and video_ts etc).
    I tried simple parse expression \<series>\season<season>\s<season>e<episode>.000 <title>.<ext> , but that did not work at all - not even for the files.

    regarding the dvds, it also always shows two entries (\video_ts\video_ts.ifo & \video_ts\vts_01_0.ifo) - even though I read in other posts that the plugin could handle dvd folders as long as there are not more than 2 episodes in them (in my case it is even only one).

    any help would be highly appreciated!

    thnx,
    MOSi
     

    RoChess

    Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,434
    1,897
    Hi,

    I have been trying now for several hours to get the plugin to work with my series. I tought I have a rather simple and uniform naming structure, but it does not recognize any of my files.

    My structure looks like that:
    \series\babylon 5\season 1 (DVD)\s01e01.001 ragesh 3\video_ts... for ripped dvds
    \series\futurama\season 1\s01.e05.005 fear of a bot planet.avi for single files.

    for ripped dvds, I have each episode in a single folder with the respective subfolders (audio_ts and video_ts etc).
    I tried simple parse expression \<series>\season<season>\s<season>e<episode>.000 <title>.<ext> , but that did not work at all - not even for the files.

    regarding the dvds, it also always shows two entries (\video_ts\video_ts.ifo & \video_ts\vts_01_0.ifo) - even though I read in other posts that the plugin could handle dvd folders as long as there are not more than 2 episodes in them (in my case it is even only one).

    Even comparing your structure to your simple expression I can see already why it would fail, because you have a space between "season" and "1", but no such space in your simple expression "\season<season>\" so it would indeed correctly ignore those and only look for "\season1\", etc. For the file one to match you forgot the (dot) between S01 and E005 as well.

    As for the IFO issue, if ISO is a valid extension, then yes it will look at *EVERY* IFO file. You have to adjust the regular expression to filter out if you only want one of them to capture.

    The simple expressions pretty much write themselves then:

    For the DVD one use: \<series>\season <season> (DVD)\s<season>e<episode>.001 <title>\video_ts.ifo
    For the File one use: \<series>\season <season>\s<season>.e<episode>.005 <title>.<ext>

    Now your problem is that I got a feeling the .001 and .005 are different numbers as well. To account for that it will be a lot harder with simple expressions, except to of course add a seperate simple expression for any variation of those numbers you have.

    What you really need is a regular expression one, such as:


    ^(?:.*\\)?(?<series>[^\\]+?)\\[^\\]+\\(?:?(?<season>\d+)[ _.\-\[\]]*[ex](?<episode>\d+)|(?:\#|\-\s)(?<season>\d+)\.(?<episode>\d+))(?:[ _.+-]+(?:?\k<season>[ _.\-\[\]]*[ex](?<episode2>\d+)|(?:\#|\-\s)\k<season>\.(?<episode2>\d+))|(?:[ _.+-]*[ex+-]+(?<episode2>\d+)))*[ _.\-\[\]]*(?:\d+\s)?(?<title>(?![^\\].*?(?<!the)[ .(-]sample[ .)-]).*?)(?:\\video_ts\.(?<ext>[^.]*)|\.(?<ext>[^.]*))$


    Which works on both filenameing schemes and only accepts video_ts.ifo for the DVD ones to avoid double imports.

    Enjoy.
     

    JimmyBoy

    Portal Pro
    April 18, 2008
    107
    8
    Home Country
    United Kingdom United Kingdom
    Hi,
    Z:\Media\TV Series\Ideal Series 6\Ideal.6x08.The_Housewarming.WS_PDTV_XviD-FoV\Sample\ideal.6x08.the_housewarming.ws_pdtv_xvid-sample-fov.avi
    Z:\Media\TV Series\Ideal Series 5\Ideal.S05E05.WS.PDTV.XviD-RiVER\Sample\ideal.s05e05.ws.pdtv.xvid-river.sample.avi
    Y:\TV Series\This Is England 86 Series 1\This.Is.England.86.S01E04.DVDRip.XviD-aAF\Sample\aaf-tie86.s01e04.dvdrip.xvid.sample.avi
    Y:\TV Series\The Simpsons\The.Simpsons.S14E18.Dude.Wheres.My.Ranch-FTV\Sample\the.simpsons.s14e18.dude.wheres.my.ranch.sample-ftv.mpg
    Y:\TV Series\Destroyed.In.Seconds.S01.DVDRip.XviD-TTi\Destroyed.In.Seconds.S01E12.DVDRip.XviD-WiDE\Sample\destroyed.in.seconds.s01e12.dvdrip.xvid-wide.sample.avi
    Y:\TV Series\Bo.Selecta\Bo.Selecta.S01E02.DVDRip.XviD-SFM\Sample\bo.selecta.s01.e02.dvdrip.xvid.sample-sfm.avi

    Anyone able to help me with mine ?
     

    RoChess

    Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,434
    1,897
    Anyone able to help me with mine ?

    None of those are generating a false positive with the default filename expression (which is 1st/primary). So either you added or forgot to disable the other expressions that are causing a problem, or you did not do a 'reset' to use the new expressions that updates of MP-TVSeries plugin come with.

    When you update an existing installation it leaves alone your expressions, since you might have modified them, so you need to do a 'reset'.

    If the 'reset' still generates false-positives, then disable all other expressions except the first one.
     

    Users who are viewing this thread

    Top Bottom