Absolute episode numbers (1 Viewer)

Mavoc

Portal Pro
October 8, 2007
72
3
Houston, TX
Home Country
United States of America United States of America
the online database has values for season, episode, and absolute episode.

most of what i would use this plugin for is anime which doesn't use season/episode numbering style but just a simple absolute number.

is it possible to make an regexp that uses the absolute episode numbers instead of the season/episode scheme.
 

GazpachoKing

Portal Pro
February 8, 2006
75
28
When using absolute numbering I have found that the season number must be detected as 1. I solved this by putting my absolute numbered animes into folders called Season 1, and designing the regex to detect that as the season number.
 

Mavoc

Portal Pro
October 8, 2007
72
3
Houston, TX
Home Country
United States of America United States of America
that only works for short run anime shows(<26 episodes) but if you do that with a show like naruto which has 220 episodes, the online database does not have any info for season 1 episode 220. though i'm still having difficulties with episode 220 being detected as season 2 episode 20.

thetvdb's wiki says they added the absolute number field in because of anime, maybe there is a way to request season "absolute" , episode "220".

if anyone has solve the problem of long animes(Naruto, Bleach, DragonBallz, etc) that doesn't involve relabeling them all to the english "season/episode" standard, please reply with how you accomplished this

:D
 

GazpachoKing

Portal Pro
February 8, 2006
75
28
I only have one anime right now so I wrote a special regex for it. I only have up to episode 100 but it definitely works past 26. here is how I parse Bleach:
Code:
(?<season>1).*(?<series>bleach)[\s-_]{1,3}(?<episode>\d+)(?:-(?<episode2>\d+))?.*\.(?<ext>[^.]*)
The season has to be 1 for all the eps for absolute numbering to work, so I have the expression match any 1 in the filename before the episode name. This means you have to have the episodes in a folder that contains the number 1.
i.e. Bleach\Season 1\[DB]_Bleach_52-53_[069BE2EB].avi
Also, since it's sort of a loose filter, I hard coded it to match only bleach and moved it to the top of my expressions list. You could probably just copy it for all similarly formated anime and just change "Bleach" to whatever in the regex.
 

Inker

Retired Team Member
  • Premium Supporter
  • December 6, 2004
    2,055
    318
    Yeah, it'll need to be detected as season 1, there is no "if no season is found assume 1" kind of thing. But for instance 1x220 or the trick by gazpachoking should work fine.
     

    Mavoc

    Portal Pro
    October 8, 2007
    72
    3
    Houston, TX
    Home Country
    United States of America United States of America
    after 20 hours of straight tinkering and backwards engineering i have solved my problem rather nicely

    thanks for the tip on bleach, it gave me what i needed to make my main regexp

    my first regexp is for absolute ordered shows (MUST BE FIRST TO WORK RIGHT)
    Code:
    Absolute (?<season>[\d])\\(\[[\w\s\-,'`%&!.]+\])*(?<series>[\w\s\-,'`%&!.]+?)(?<episode>[\d]+)(-(?<episode2>[\d]+))?(?<title>[\w\s-,'`%&!.]+)?.*\.(?<ext>[^.]*)

    \Absolute 1\<series> - <episode>-<episode2> - <title>.<ext>

    notes:
    "Absolute 1" this regexp only works if Absolute is in the folder name and 1 is required for the season number to make it work
    <episode2>&<title> are optional

    and this is my second regexp which is a slightly modified from one of the default ones
    Code:
    ^.*?\\?(\[[\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>(?![^\\]*?sample)[^\\]*?[^\\]*?)\.(?<ext>[^.]*)$

    this will pick up the s#e## filenames as well as many poorly formated ones (like the various styles they come downloaded as)

    with these 2 codes all my files work as long as they have at least a basic name format
     

    LordRaven

    New Member
    August 10, 2007
    2
    0
    44
    I was facing the same problem. I have a lot of Anime series that I wanted to add to the DB, but since they are all named continuously (no seasons) it was impossible. Creating different regxp entries never solved my problem. Looking at the source code of MPTV I realized that the scanning routines needs a season number or the filename is considered invalid.

    Now I could rename all my files (1000+, no joy) or find a way to add them to the db.

    Naruto episodes for example are split up into seasons in the online db (I presume because they were aired as seasons in the US). Anyway I needed a way to match absolute episodes to the seasons/episode based index.

    Therefore I created a program that reads my episodes filenames and then automatically matches them to the season/index system. Manual correction is also possible since there are sometimes things like 3 episodes in one file (3 episodes aired right after one another). After that my program updates the database file (TVSeriesDatabase4.db3) adding the episodes in the correct format (creating the needed entries in the tables"local_episodes", "online_episodes", "local_series", "online_series" and "season").

    Then all I have to do is trigger an update in the options dialog and voila I had my Anime imported. (Took me a while to figure out what exactly to write to the DB to trigger an auto update though).

    This solved my problem, but it’s far from perfect. Every time a new episode comes along I have to use my program to generate a DB entry and trigger an online update.
    What I would wish for is an option in MPTV to manually set the seasons/episode index if it is necessary.
    It would also help tremendously if the default season would be set to “1”, so if a file does not have a season, it assumes that you mean season 1.
    That would allow people to add anime series that span 20+ episodes, like Cowboy Bebop for example. It still doesn’t solve the problem for Naruto with 220 episodes, which is broken down into 9 seasons in the online TV DB.

    PS: if anyone is interested in the program, send me as message or e-mail.
     

    samo_yea

    Portal Pro
    November 12, 2007
    54
    27
    Home Country
    Italy Italy
    Hi all!

    In version 2.0 I can't manage to get the absolute sorting working.

    I have the episodes saved in this format, suggested in this thread:

    Bleach\Season 1\Bleach - 173.avi

    The serie is recognized ok.
    The episode is parsed correctly, but I get no episode data from the thetvdb.com. Other series in Aired order works great.

    In the db is stored this:
    Series ID: 74796
    Season index: 1
    Episode index: 173
    Composite episode ID: 74796_1x173

    Is something wrong with my parsing?
    Is a known bug?

    :sorry: for my "not perfect" english :p
     

    Mavoc

    Portal Pro
    October 8, 2007
    72
    3
    Houston, TX
    Home Country
    United States of America United States of America
    bleach works fine for me so i know it is not a TVDB.com problem. have you varified that absolute is the selected sorting method?
     

    Users who are viewing this thread

    Top Bottom