Expressions/Rules requests (7 Viewers)

DaBaSe

MP Donator
  • Premium Supporter
  • November 4, 2009
    101
    7
    Home Country
    Germany Germany
    Hello Community,

    i have a issue with one kind of Series. Especially with Star Trek - Enterprise.
    I use the TV Movie importer ++ and the Episodenscanner for my recordings.

    My Files looks like d:\Videos\Serien\Star Trek - Enterprise\Star Trek - Enterprise - (Carbon Creek) S2E2 - 2013-12-06 - 01_40.ts
    I use the settings from the Episodenscanner =
    Recording Settings => Custom Paths and Filenames => Recording Series => Filename:
    %title%\%title% - (%name%) S%series%E%episode% - %date% - %start%

    and for parsing=
    ^.*?\\(?<series>.*?) - \((?<title>.*?)\) S(?<season>[0-9]+?)E(?<episode>[0-9]+?) - [0-9]+-[0-9]+-[0-9]+ - [0-9]+_[0-9]+\.(?<ext>[^.]*)$

    But every time, i have a new recording, i start the importer in MP and he ask for a manuel match for the serie. He open the search window with the option "Star Trek - Enterprise - (Carbon Creek)".For me it look like, he has a problem with the second hyphen. I try a string replacement in MP TV Series (Star Trek Enterprice) without the first hyphen, but it doesn't matters.

    The regex string is a bit cryptic for me.

    Perhaps anyone has a solution for my issue.

    greetings
    Lars
     

    RoChess

    Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,434
    1,897
    My Files looks like d:\Videos\Serien\Star Trek - Enterprise\Star Trek - Enterprise - (Carbon Creek) S2E2 - 2013-12-06 - 01_40.ts

    The default primary parsing expression (you might need to use the 'Reset' button to ensure you got the latest version) should take care of that without any problem if the series title is correct. It looks for:

    Series Name Valid with TheTVdB - S01E01 - Episode Title.ext

    (Epsiode title and hypens are all optional, S01 and S1 are both valid/accepted, as is S2014E01 for year based shows)​

    That is your problem, the "(Carbon Creek)" is made part of the series title and fails to therefore find a match. Easy solution is to add a string replacement (before parsing) that takes:

    "Star Trek - Enterprise - (Carbon Creek)"

    and turns it into the TheTVdB correct tile of:

    "Star Trek: Enterprise"

    Since it is a string replacement, you can use invalid filename characters such as a semi-colon.

    You can always manually verify if it works via: http://www.thetvdb.com/api/GetSeries.php?seriesname=Star Trek: Enterprise

    PS: I just realized that "(Carbon Creek)" is more then likely the episode title and dynamic in nature. The only way to make dynamic strings be ignored is indeed to modify the parsing expression.

    Current default primary parsing expression is:

    Code:
    ^(?:.*\\)?(?<series>[^\\]+?)[ _.\-\[]+(?:[s]?(?:eason\s?)?(?<season>\d+)[ _.\-\[\]]*[ex](?:pisode\s?)?(?<episode>\d+)|(?:\#|\-\s)(?<season>(?!(?:\d{4}.\d{2}.\d{2}|\d{2}.\d{2}.\d{4}))\d+)\.(?<episode>\d+))(?:[ _.+-]+(?:[s]?(?:eason\s?)?\k<season>[ _.\-\[\]]*[ex](?:pisode\s?)?(?<episode2>\d+)|(?:\#|\-\s)\k<season>\.(?<episode2>\d+))|(?:[ _.+-]*[ex+-]+(?:pisode\s?)?(?<episode2>\d+)))*[ _.\-\[\]]*(?<title>(?![^\\].*?(?<!the)[ .(-]sample[ .)-]).*?)\.(?<ext>[^.]*)$

    Change that to:

    Code:
    ^(?:.*\\)?(?<series>[^\\]+?)[ _.\-\[]+(?:\(.+\)\s*)?(?:[s]?(?:eason\s?)?(?<season>\d+)[ _.\-\[\]]*[ex](?:pisode\s?)?(?<episode>\d+)|(?:\#|\-\s)(?<season>(?!(?:\d{4}.\d{2}.\d{2}|\d{2}.\d{2}.\d{4}))\d+)\.(?<episode>\d+))(?:[ _.+-]+(?:[s]?(?:eason\s?)?\k<season>[ _.\-\[\]]*[ex](?:pisode\s?)?(?<episode2>\d+)|(?:\#|\-\s)\k<season>\.(?<episode2>\d+))|(?:[ _.+-]*[ex+-]+(?:pisode\s?)?(?<episode2>\d+)))*[ _.\-\[\]]*(?<title>(?![^\\].*?(?<!the)[ .(-]sample[ .)-]).*?)\.(?<ext>[^.]*)$

    That will strip out any "(.....) " string at the end of the series name, so you would end up with:

    http://www.thetvdb.com/api/GetSeries.php?seriesname=Star Trek - Enterprise

    Which also gives a valid match.

    Enjoy.
     
    Last edited:

    DaBaSe

    MP Donator
  • Premium Supporter
  • November 4, 2009
    101
    7
    Home Country
    Germany Germany
    Hello RoCHess,

    thank you for your help.

    As i told before, the regex is absolute cryptic for me. I try your new regex, but it didnt work for me.
    But youre talk about the default primary parsing expression. I didnt know that there is a "priority" for the parsing expressions.
    So i move the regex from the Episodenscanner to the top and it work.

    I cant tell you why, but it does.

    I leave your regex in the configuration, also with the "original" regex. Is that a problem or not?
     

    RoChess

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

    thank you for your help.

    As i told before, the regex is absolute cryptic for me. I try your new regex, but it didnt work for me.
    But youre talk about the default primary parsing expression. I didnt know that there is a "priority" for the parsing expressions.
    So i move the regex from the Episodenscanner to the top and it work.

    I cant tell you why, but it does.

    I leave your regex in the configuration, also with the "original" regex. Is that a problem or not?

    Whatever works for you, the expressions are processed in order, and if you install MP-TVSeries fresh then the primary/first expression is the one I helped build, the idea was for you to *replace* that with the new code, although you could technically place the new one above it for same result.

    Once an expression has a positive match (even if its wrong, called a "false positive"), it is immediatly processed, if it fails, then MP-TVSeries tries the next expression until it eventually fails on all and then it aborts.
     

    ltfearme

    Community Plugin Dev
  • Premium Supporter
  • June 10, 2007
    6,755
    7,200
    Sydney
    Home Country
    Australia Australia
    I have utterly failed at getting mp-tvseries to recognize The Daily Show and The Colbert Report episodes with the airdate in the filename and it is frustrating me to no end.
    Have you tried resetting your expressions, if so then post an example of your filename.
     

    STANirvanaIND

    Portal Member
    March 1, 2012
    8
    0
    34
    Home Country
    United States of America United States of America
    Hi Everyone,

    I've been having some issues with an expression that can import a single file with three or more episodes in it (ie. Rugrats - S08E12-E13-E14). All of my media for television shows is arranged in the following fashion: <series>\Season <season>\<series> - S<season>E<episode>.<ext> or <series>\Season <season>\<series> - S<season>E<episode> - <title>.<ext>.
    (ie. "Archer (2009)\Season 4\Archer (2009) - S04E01.mkv" or "The X-Files\Season 4\The X-Files - S04E02 - Home.avi")

    The only variation in this is if a file has multiple episodes in it such as "Seinfeld - S04E01-E02.avi" or "King of the Hill - S06E21-E22 - Returning Japanese.mkv" which has normally been handed fine with something like <series>\Season <season>\<series> - S<season>E<episode>-E<episode2>.<ext> or <series>\Season <season>\<series> - S<season>E<episode>-E<episode2> - <title>.<ext>

    Recently, however, I've gotten some files with three episodes in them and cannot make an expression to handle it. Adding an <episode3> makes a new column called "episode3" in the import but doesn't actually detect the episode in the database afterward. All of my expressions are currently simple expressions due to problems I was having before with regular expressions and some files ("The Outer Limits (1995)" was being read as season 19 rather than the title, although other dated shows such as Archer were fine).

    Does anyone know an expression that could work for these three episode (or more) files? Thanks.
     

    RoChess

    Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,434
    1,897
    I've been having some issues with an expression that can import a single file with three or more episodes in it

    MP-TVSeries *ONLY* supports single episode files, or double episode files.

    So you are out of luck for an easy fix.

    There are however countless tools available that allow you to split a single file into seperate files, without a need to re-encode the codecs, so very quickly you can turn that one file with 3 episodes into three seperate files, or two. Hard links are an alternative to import all episodes correct, but splitting the files is much easier because then you can directly view 1x03 without first having to load 1x01 and skipping to the right position on a S01E01+02+03 single file scenario.
     

    Sea Monkey

    Portal Member
    June 13, 2011
    38
    8
    I have been really having trouble with Season 4 (1999) of The Daily Show. The filenames have air dates in them, but MP-TVseries wants to detect them as Season 19. Even when I delete out Season 19 and run the importer to manually identify the episodes, they don't show up at all in the importer, yet they are back there again in season 19 in the details tab.

    It appears that they are also listed in season 4 from previous manual ID, but keep reappearing in 19 as well.

    At the moment, I'm just hiding the incorrect listings in Season 19, but this makes S19E2-12 invisible altogether. Even when I list hidden items, the ACTUAL S19E2-12 files don't appear at all!
     
    Last edited:

    Users who are viewing this thread

    Top Bottom