Expressions/Rules requests (5 Viewers)

RoChess

Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,434
    1,897
    Supported Already = How I Met Your Mother\Season 1\1x04 - Return of the Shirt
    Yours = How I Met Your Mother\Season 1 (2005-2006)\1x04 - Return of the Shirt

    So removing " (2005-2006)" would solve it.

    That is what "String Replacements" are for. Adding the following dynamic one would solve your problems:

    Enabled =checked
    Used as Tag = unchecked
    Run before matching = checked
    Is RegEx = checked
    Replace this = \s+\(\d{4}-\d{4}\)
    With this = <empty>

    Enjoy.
     

    MrGrymReaper

    MP Donator
  • Premium Supporter
  • July 28, 2009
    53
    37
    Home Country
    United Kingdom United Kingdom
    Is it possible please for me to have a parsing rule which will recognise the content downloaded from iTunes?

    Specifically the new iTunes version 12.2.2.25 as the tv shows file paths now have alterations which none of the parsing rules will recognise.

    So that you can see here is a sample of 3 file paths:-

    T:\TV Shows\Smallville\01 Season 1, Episode 1_ Pilot.m4v
    T:\TV Shows\Smallville\02 Season 1, Episode 2_ Metamorphosi.m4v
    T:\TV Shows\Smallville\03 Season 1, Episode 3_ Hothead.m4v

    None of these are recognised and parsed by MP-TVSeries.
     
    Last edited:

    RoChess

    Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,434
    1,897
    @MrGrymReaper, do you have any multi-episode examples? Otherwise a simple expression will work just fine for those

    And Apple as usual makes no sense, because how does it sort:

    T:\TV Shows\Smallville\01 Season 1, Episode 1_ Pilot.m4v
    T:\TV Shows\Smallville\01 Season 2, Episode 1_ Foo.m4v
    T:\TV Shows\Smallville\01 Season 3, Episode 1_ Bar.m4v
    T:\TV Shows\Smallville\02 Season 1, Episode 2_ Metamorphosi.m4v
     

    WizzbangMagic

    New Member
    August 14, 2015
    1
    0
    62
    Home Country
    Australia Australia
    All my TV episodes are structured this way:

    D:\TV Series\An idiot abroad\Season 01\S01E01 (China).avi

    I cannot find a list of all expressions so would appreciate someone helping me with the appropriate parsing string
    Thanks in advance.
     

    MrGrymReaper

    MP Donator
  • Premium Supporter
  • July 28, 2009
    53
    37
    Home Country
    United Kingdom United Kingdom
    I also have the same issue (as the post made by me during August) for the following Grimm television series see the attached txt file.

    It usually sorts by an episode number (in iTunes DB) which is part of the file name (first set of numbers) and does it incrementally.

    Though the dir listing txt file should hopefully give you an idea of the out of iTunes sorting order and naming system.

    Since this issues is likely to occur more frequently as more people move to the new versions of iTunes (version 12 or above) and/or re-download (for whatever reason) their past purchases. Alternatively any new ones the new naming format will be used and old naming parsing rules will likely not work reliably.

    Also what naming or stripping rule would be needed to remove from the search or parse the numbers at the beginning of the filename.

    So if anyone could create a new parsing rule for the exchange and please PM me about it it would be much appreciated.

    Thank you for your time and attention in this matter.
     

    Attachments

    • TvShows-Dirlist.txt
      6.9 KB
    • dirlist-Smallville-TV Show.txt
      16 KB
    Last edited:

    MrGrymReaper

    MP Donator
  • Premium Supporter
  • July 28, 2009
    53
    37
    Home Country
    United Kingdom United Kingdom
    Can anyone please explain how to strip out (ignore) the numbers in the first part of the file name while recognising the other parts please - series name, season and episode number?

    Through a set of rules for MP-TVSeries so it can recognise every episode for season for all of iTunes television shows.
     
    Last edited:

    RoChess

    Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,434
    1,897
    @MrGrymReaper, try the following as primary (that means first) regular expression entry in the parsing list:

    Code:
    (?<series>[^\\]+)(?:(?:\\(?:Season)?[ .-]*\d+)?\\(?:\d+\s*)?(?:Season)[ .-])?(?<season>\d+)[ .,]*(?:[ex]|Episode)\s*(?:[ .+-]e?(?<episode2>\d+))?(?:[ _-]+(?<title>[\w -.,'!&$][^$]*?))?\.(?<ext>[^.]*)$

    If that works I will add it as an iTunes expression to the exchange thread.
     

    MrGrymReaper

    MP Donator
  • Premium Supporter
  • July 28, 2009
    53
    37
    Home Country
    United Kingdom United Kingdom
    Here's an updated dir list text file for my Smallville Library. Along with several others from my digital media purchasing on demand collection.

    Which are unfortunately still not getting fully identified with RoChess's reg-ex primary rule posted on 21/09/2015.

    So could RoChess or anyone else that can produce a parsing expression rule have an attempt at doing so. I'm currently running Apple iTunes 12.3 on my computer following my device's iOS update.
     

    Attachments

    • Smallville-Dir-List-Updated.txt
      16 KB
    • Eureka-Season 1-Dir-List.txt
      962 bytes
    • Eureka-Season 2-Dir-List.txt
      644 bytes
    • The X-Files-Season 8-Dir-List.txt
      1.4 KB

    bta489

    Portal Pro
    March 17, 2013
    177
    99
    Home Country
    Germany Germany
    @MrGrymReaper Here is a quick'n'dirty attempt of an expression for your Smallville-File-Structure:
    Code:
    (?<series>[^\\]+)\\[\d]+\sSeason\s(?<season>[\d]+)\,\sEpisode\s(?<episode>[\d]+)\_\s(?<title>.+)\.(?<ext>[^\.]*)$

    My Knowledge of Regular Expression isn't nearly enough to understand what @RoChess was aiming for, so this straightforward hack might not be as robust as the 'official' parsing expressions. It might give you good results, though. :)

    @WizzbangMagic : equally Quick'n'dirty:
    Code:
    (?<series>[^\\]+)\\[^\\]+\\S(?<season>[\d]+)E(?<episode>[\d]+)\s\((?<title>.+)\)\.(?<ext>[^\.]*)$
     

    Users who are viewing this thread

    Top Bottom