Expressions/Rules requests (2 Viewers)

scma

Portal Pro
December 24, 2005
77
4
Home Country
Sweden Sweden
At the moment I'm renaming them to something like this: World.Series.Of.Poker - 2007x01 - No Limit.avi

Sorry can't help you with a regex, but you could simply try adding an "S" to the front of the 2007 and it should match correctly.

Unfortunatly that didn't work. I think the regex's expect the season's to be two figures
 

MojoFlow

Portal Member
March 4, 2007
22
0
Home Country
Canada Canada
I am using BeyondTV to currently record tv, and I need an expression to convert using their naming conventions, they have 2.

Movies:

Metropolis-2007-01-14-0.avi

TV Series:

NUMB3RS-(The Janus List)-2007-05-18-0.avi

Any help on a simple or regular expression for these two formats?

Thanks!

p.s. For the Movies format, would it be possible to make an expression that would classify it as the series 'Movies', and then the episode would be the actual movie title.
 

Inker

Retired Team Member
  • Premium Supporter
  • December 6, 2004
    2,055
    318
    I am using BeyondTV to currently record tv, and I need an expression to convert using their naming conventions, they have 2.

    Movies:

    Metropolis-2007-01-14-0.avi

    TV Series:

    NUMB3RS-(The Janus List)-2007-05-18-0.avi

    Any help on a simple or regular expression for these two formats?

    Thanks!

    p.s. For the Movies format, would it be possible to make an expression that would classify it as the series 'Movies', and then the episode would be the actual movie title.

    For Series:
    PHP:
    (?<series>[^\\$]+)?\-+?.*\((?<title>.*[^\\]?)\)\-?(?<FirstAired>((19|20)(\d{2})(\.|-|/)([0-3]\d)(\.|-|/)([0-3]\d))).*\.(?<ext>[^.]*)$
    but only if the date is the original "first airdate" according to the online DB. Otherwise its not going to work (reruns etc.)

    Movies? No, not what this plugin is for.

    Inker

    Hi guys,
    .......

    That is an interesting Expression and I see no reason why in theory it shouldn't work. I'll go and give this a try tomorrow to see if i can't figure it out. The plugin just calls the .NET regex engine, so its possible the engine differs a bit from what that tool you used uses.
     

    MojoFlow

    Portal Member
    March 4, 2007
    22
    0
    Home Country
    Canada Canada
    Inker,

    Thanks for the quick response.

    I couldn't get the series code to work. Likely it is because that isn't necessarily the first aired date, it is the date the recording took place. Can that expression be modified so that it just ignores the date section, but extracts the series and episode name?

    Thanks!
     

    Inker

    Retired Team Member
  • Premium Supporter
  • December 6, 2004
    2,055
    318
    Inker,

    Thanks for the quick response.

    I couldn't get the series code to work. Likely it is because that isn't necessarily the first aired date, it is the date the recording took place. Can that expression be modified so that it just ignores the date section, but extracts the series and episode name?

    Thanks!

    No, it needs either:
    Seriesname + Season + Episodenumber
    or
    Seriesname + First Aired Date
    somewhere in the filename.

    The expression itself works though, I tried with the sample filename you provided. However if its a recordings date than it can't match it to an actual season/episode so you get no data at all. The title is extracted from the filename though and so is the series, so in theory you should have all your episodes show up in MP, just out of order and with no meta-data.

    You can try that mediarenamer tool, perhaps it can search by episode title.
     

    MojoFlow

    Portal Member
    March 4, 2007
    22
    0
    Home Country
    Canada Canada
    Thanks,

    I will work with it a bit.

    I thought there was an error with the expression because when I used the 'parsing tests' in config, I got no values for any series or titles.

    I will mess around with it some more on my end.

    Thanks for your help.

    I am having some problems getting any results using this regex. I just downloaded a program called 'expresso' to try to figure out what was going on, and it says there is an additional ')'. Can you confirm you pasted your working version in the sample above?

    Thanks again.
     

    infinite.loop

    Retired Team Member
  • Premium Supporter
  • December 26, 2004
    16,163
    4,133
    127.0.0.1
    Home Country
    Austria Austria
    i just noticed that files like:
    Code:
    Battlestar Galactica - S03E03 - Exodus part1.avi
    can not be parsed.

    after adding the following "simple" expression
    Code:
    <series> - S<season>E<episode> - <title>.<ext>

    all works fine. :)

    maybe a good default expression?

    keep up the great work! i love the new release.
    :D
     

    Inker

    Retired Team Member
  • Premium Supporter
  • December 6, 2004
    2,055
    318
    i just noticed that files like:
    Code:
    Battlestar Galactica - S03E03 - Exodus part1.avi
    can not be parsed.

    after adding the following "simple" expression
    Code:
    <series> - S<season>E<episode> - <title>.<ext>

    all works fine. :)

    maybe a good default expression?

    keep up the great work! i love the new release.
    :D

    That had me puzzled, so I just tested that filename and it works just fine.
    The following default regex matches it:
    Code:
    ^.*?\\?(?<series>[^\\$]+?)(?:s(?<season>[0-1]?\d)e(?<episode>\d\d)|(?<season>(?:[0-1]\d|(?<!\d)\d))x?(?<episode>\d\d))(?!\d)(?:[ .-]?(?:s\k<season>e?(?<episode2>\d{2}(?!\d))|\k<season>x?(?<episode2>\d{2}(?!\d))|(?<episode2>\d\d(?!\d))|E(?<episode2>\d\d))|)[ -.]*(?<title>(?![^\\]*?sample)[^\\]*?(?<HR>HR\.)?[^\\]*?)\.(?<ext>[^.]*)$

    Could you make sure you have that one enabled?
     

    Users who are viewing this thread

    Top Bottom