Expressions/Rules requests | Page 74

Discussion in 'My TVSeries' started by Inker, April 12, 2007.

  1. bobert24

    bobert24 Portal Member

    Joined:
    April 5, 2013
    Messages:
    6
    Likes Received:
    0
    Ratings:
    +0 / 0
    Home Country:
    United States of America United States of America
    Of course not. That would have been too easy, and saved that extra hair that I apparently didn't need.

    I didn't realize false positives could happen and screw up the parsing. It makes perfect sense, of course. I actually thought about this while I was dealing with the problem yesterday - it would be fantastic if there was a way to tell which rule a show was processed under. That way false positives could be easily picked out, rules rearranged, etc.



    Also, is there some kind of guide to the regular expressions used in here? Like I said, I've dealt with them more than a few times, but the ones that come loaded by default are complex enough that, without some sort of reference or place to start, they're very difficult to make sense of, much less modify.
     
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. RoChess
    • Premium Supporter

    RoChess Extension Developer

    Joined:
    March 10, 2006
    Messages:
    4,204
    Likes Received:
    1,319
    Ratings:
    +1,709 / 2
    Grab Expresso from: http://www.ultrapico.com/Expresso.htm

    It has a "Regex Analyzer" that allows you to disect the regular expressions used down to the very core and splits all the groups to make it easy.

    Also comes with a builder, so you can use it as a reference when modifying or creating a regular expression.

    The default expression is one that I've build and maintain, it is compatible to the syntax that is used by myself and majority of content available:

    "Series - S01E01 - Episode Title.ext" format, but also works on "series.s01e01.title.quality-tag.scene-tag.ext" and many others​

    It has indeed grown to be quite complex due to the mass support of combinations, as well as preventing as many false positives as possible, but it has been tested on extremly large collections. So the false positive you ran into is more then likely caused by some of the other default expressions that were kept to retain backwards compatability.
     
  4. liteglow

    liteglow Portal Pro

    Joined:
    November 13, 2011
    Messages:
    93
    Likes Received:
    6
    Ratings:
    +8 / 0
    Home Country:
    Norway Norway
    i think i maybe posted my question in a wrong thread.
    but mp-series does not find the series "24" , this is how each episode is listed: 24 Season 6 Episode 13 - 6PM - 7PM
     
  5. RoChess
    • Premium Supporter

    RoChess Extension Developer

    Joined:
    March 10, 2006
    Messages:
    4,204
    Likes Received:
    1,319
    Ratings:
    +1,709 / 2
    If you do an easy mass-rename of " Season " == " - S" and " Episode " == "E" so it becomes "24 - S6E13 - 6PM - 7PM", then the default expression will import it fine.

    Inface this is what you can use the String replacement system in MP-TVSeries for as well, so just add the above replacements (including the spaces, so everything between quotes) and it will work
     
    • Agree Agree x 1
  6. kiwijunglist
    • Team MediaPortal

    kiwijunglist Super Moderator

    Joined:
    June 10, 2008
    Messages:
    6,746
    Likes Received:
    1,420
    Occupation:
    Doctor
    Location:
    New Zealand
    Ratings:
    +1,849 / 9
    Home Country:
    New Zealand New Zealand
    Show System Specs
    It's a shame that tvseries doesn't have default support for "%series% - Season # Episode #.ext" as it's not that uncommon @ltfearme
     
  7. ltfearme
    • Premium Supporter

    ltfearme Community Plugin Dev

    Joined:
    June 10, 2007
    Messages:
    6,551
    Likes Received:
    4,406
    Gender:
    Male
    Occupation:
    Software Test Engineer
    Location:
    Sydney
    Ratings:
    +5,622 / 0
    Home Country:
    Australia Australia
    Maybe you can convince our resident RegEx guru @RoChess, I will happily update our default one or add a new one ;)
     
  8. RoChess
    • Premium Supporter

    RoChess Extension Developer

    Joined:
    March 10, 2006
    Messages:
    4,204
    Likes Received:
    1,319
    Ratings:
    +1,709 / 2
    Done :cool: -- https://forum.team-mediaportal.com/threads/expressions-rules-exchange.21977/page-3#post-701043

    It should be a relative safe upgrade, but there is always the risk of introducing false-positives.

    Expresso gave me no errors on my existing test list of:
    • foo.s01_e01.bar-episode-title.ext
    • foo_[s01]_[e01]_bar-episode-title.ext
    • foo_[s01]_[e01-02]_bar-episode-title.ext
    • foo.1x01.1x02.bar-episode-title.ext
    • foo #1.01 + #1.02.bar-episode-title.ext
    • foo.1x01.1x02.bar-episode-title.ext
    • foo s01e01 - e02 bar-episode-title.ext
    • foo s01e01 + s01e02 bar-episode-title.ext
    • foo - s01e01 - s01e02 - bar-episode-title.ext
    • foo.2009x101.bar-episode-title.ext
    • foo.S18E203.2010.08.27.bar-episode-title.ext
    • 24.S08E01.04.00.PM-05.00.PM.bar-episode-title.ext
    And it now also works on:
    • foo season 1 episode 01 - bar-episode-title.ext
    • foo season 1 episode 01 + episode 02 - bar-episode-title.ext
    • (and many more combinations)
    Enjoy
     
    • Like Like x 1
    • Great Idea! Great Idea! x 1
  9. kiwijunglist
    • Team MediaPortal

    kiwijunglist Super Moderator

    Joined:
    June 10, 2008
    Messages:
    6,746
    Likes Received:
    1,420
    Occupation:
    Doctor
    Location:
    New Zealand
    Ratings:
    +1,849 / 9
    Home Country:
    New Zealand New Zealand
    Show System Specs
    I don't need to upgrade because I'm a super user, only have the one file naming format to parse which is
    \TV\%series%\Season #\%series% - S#E# - %tilte%.ext
     
    Last edited: June 6, 2013
  10. Grimeh

    Grimeh New Member

    Joined:
    December 1, 2013
    Messages:
    1
    Likes Received:
    0
    Gender:
    Male
    Ratings:
    +0 / 0
    Home Country:
    Australia Australia
    First of all i would like to say that I am not a coder and that i would like to see this addon and MP succeed.
    I am trying to get the import to recognise some files as tv shows and i thought i would give the "simple" parsing expression a go, but i am finding that there is no guide for what tags i can use so i don't have to rename my files (due to future automatic downloads and current uploads\shares that i can't change) even though i have stumbled my way through to this point.
    This is the file details:
    Foo\Foo Season x\101.Title.tilte.title.avi

    And this is my simple parsing expression so far:
    <series>\<null>\<season>[0-9]<episode>[0-99].<title>

    This kinda works but with out knowing what i can use i have tried some hybrid combination using the [0-9] etc. (which i think is probably messing things up, but i dont know any other way to get what i need)
    Can anyone help me out and give me the guide\low down on what tags i can use.

    I am also comparing MP (with tvseries) to the standard XBMC scrapper (which picks up all the epps that this currently does not) and it got me thinking.
    If i understand the way this is working, why don;t the devs compile and maintain a "super" parsing expression .expr file or online resource that the program can query or download to use?
     
  11. RoChess
    • Premium Supporter

    RoChess Extension Developer

    Joined:
    March 10, 2006
    Messages:
    4,204
    Likes Received:
    1,319
    Ratings:
    +1,709 / 2
    They already do, and I help maintain the primary expression. It's the one that parses my entire collection and follows the scene defined standard formatting of:

    "Show Name - S01E01 - Episode Title.ext"

    Supporting the millions of other combinations that users create is a developers nightmare. Still extra expressions are added to account for a few alternative schemes, but it is impossible to account for all. If enough users on the "Express/Rules Exchange" vote that new expressions work fine for them, then they can be added to the default. The problem is that a new expression for one user can lead to false positives for another. This is why new expressions are only added with extreme caution.

    I did recently help create an expression that solves acronym show names, and that one is now default and part of the installer. But once again extreme caution is used. You might never see that expression, until you hit RESET inside the expression list, because by default the installer doesn't upgrade expression out of fear you might have made custom modifications and it does not want to break them.

    So verify first you have the current expressions in use right now by using RESET, test again and check the Exchange thread to see if an expression already exists for your non-standard naming scheme. Then if you know a certain expression works, and it is not default, do all the testing to ensure it will not lead to false positives for the 99% who do use standard naming schemes.
     
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!