Parsing Expressions? (1 Viewer)

SniperFC

Portal Member
November 8, 2007
14
0
Hi I asked this in one of the other threads but i don't think its read much anymore, sorry to be double posting.

Basicly I can get my head round this parsing and Expressions thing, im not a coder of anysort.

heres a few of the files giving me a problem:

[AHQ] Rurouni Kenshin - 01 - The Handsome Swordsman of Legend.ogm

[AHQ] Samurai Deeper Kyo - 01 - The Road to Armageddon.ogm

[AHQ] Yu Yu Hakusho - 001 - Surprised to be Dead.ogm

There is no season information to these, I could llok it up and rename them which I have done for other shows but im still downloading some of it and its taking a LONG time.

any help would be great.


Thanks
 

Inker

Retired Team Member
  • Premium Supporter
  • December 6, 2004
    2,055
    318
    You'll have to trick the plugin as it won't work without a season information. So for all your series that have this (absolute order without a season 1 in filename) add a string replacement that replaces the series name with something like

    "Rurouni Kenshin - "-> "Rurouni Kenshin 1x"

    Make sure you tick "run before matching" on these. I would also remove the [AHQ] with a string replacement as its easier than messing with regex.
     

    Mavoc

    Portal Pro
    October 8, 2007
    72
    3
    Houston, TX
    Home Country
    United States of America United States of America
    this is my way of parsing Anime and i have not seen another way that comes close to working as good :)

    first off use this file structure
    (<series>)/Absolute 1/<series> - <episode>(-<episode2>)( - <title>).<ext>
    items in () are optional

    so for your example do this
    Rurouni Kenshin/Absolute 1/[AHQ] Rurouni Kenshin - 01 - The Handsome Swordsman of Legend.ogm

    this is my parser and it is the first parser in the list

    Absolute (?<season>[\d])\\(\[[\w\s\-,'`%&!.]+\])*(?<series>[\w\s\-,'`%&!.]+?)(?<episode>[\d]+)(-(?<episode2>[\d]+))?(?<title>[\w\s-,'`%&!.]+)?.*\.(?<ext>[^.]*)

    this will only parse files in a folder with "Absolute #" and only 1 will work for the number(seems 0 does not work for specials atm)

    (\[[\w\s\-,'`%&!.]+\])*
    this will tell it to ignore anything in [] at the beginning of the file name

    the only issues i'm having so far is with series with numbers in the name.

    then for every other show i use this parser that i modified from a default one

    ^.*?\\?(\[[\w\s\-,'`%&!.]+\])*(?<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>[\w\s-,'`%&!.]+)?.*\.(?<ext>[^.]*)

    both of these are regexp and not simple btw

    i've been attempting to make one ultimate parse for everything but i think i'm going to settle with one for Absolute ordering shows and one for Seasonal ordering shows.

    P.S. Inker, maybe we should make a Sticky thread devoted to Absolute ordering with Anime in the title. as this is a very common issue to have and it is alittle hard to find a good answer here.
     

    Users who are viewing this thread

    Top Bottom