Welcome to our forums! Please take a few moments to read through our Community Guidelines (also conveniently linked in the header at the top of each page). There, you'll find guidelines on conduct, tips on getting the help you may be searching for, and more!

[Patch] Plex Series Scanner.py

title from file for Personal Media Show
file : Resources\Plug-ins\Scanners.bundle\Contents\Resources\Series\Plex Series Scanner.py

episode_regexps variable modified this way :

'(?P<show>.*?)([^0-9]|^)(?P<season>[0-9]{1,2})[Xx](?P<ep>[0-9]+)(-[0-9]+[Xx](?P<secondEp>[0-9]+))?(\. +(?P<title>.+)(\..+)?$)?', # 3x03

=> (\. +(?P<title>.+)(\..+)?$) added


for instance, S03E04-E05, S03-03 and 602 have been left untouched.

Media.Episode modified this way whenever possible :

        title = None
        if match.groupdict().has_key('title') and match.group('title'):
          title = match.group('title')
...
	... = Media.Episode(..., ..., ..., title, ...)


see attached patch (Plex Series Scanner.py.diff.txt) for details.

not so important, many initial blanks deleted (see Plex Series Scanner.py.diff2.txt)

Comments

  • gitsgits Posts: 32Members ✭✭
    replaced by Custom Plex Scanner
    use google translation from french to your language to understand comments.
  • wally007wally007 Posts: 1,160Members, Plex Pass Plex Pass
    thanks but google didnt really improve things much :blink:

    Is this to improve plex' multi-episode scanner behavior ? I've been trying to improve plex' default episode scanner myself but gave up ( and now i dont remember where i left off :-))

    gits wrote:

    replaced by Custom Plex Scanner
    use google translation from french to your language to understand comments.
  • gitsgits Posts: 32Members ✭✭
    wally007 wrote:

    thanks but google didnt really improve things much :blink:

    Is this to improve plex' multi-episode scanner behavior ? I've been trying to improve plex' default episode scanner myself but gave up ( and now i dont remember where i left off :-))


    not really, the primary purpose was a better cleanup of french divx names which contains tags you (en_us) don't have such as french, truefrench, etc.
    also, I've plenty of documentaries, the problem is that some looks like films (no 1xN prefix) and others like series (have 1xN prefix), so, I create my own based on the Series Scanner.
    to not conflict w/ existing scanners, I duplicates all of them w/ a Custom prefix since they depends on Custom stuffs in Common/.

    in my collection, I've some episode w/ the following format : 1x01-02. title or 1x01-1x02. title, is that what you call a multi-episode ?
    in this regard, I've effectivelly made some regexp more homogeneous.
  • wally007wally007 Posts: 1,160Members, Plex Pass Plex Pass
    edited December 2012
    gits wrote:

    in my collection, I've some episode w/ the following format : 1x01-02. title or 1x01-1x02. title, is that what you call a multi-episode ?


    Yes , that's what I'd call multi-episode ... sorry. :-)

    I made a mistake though... i was writing customer AGENT (scraper) but did not finish. It's hard to ever finish anything with 2 year old, house and a job :-(
  • IsmeldaIsmelda Plex Ninja Posts: 992Members, Plex Pass, Plex Ninja Plex Ninja
    edited July 2013
    I updated the Custom Plex Scanners as a new argument has been introduced in the regular scanners making the custom ones giving an error on scanning and thus not scanning at all.

    So for those who haven't tried it yet here a sum up of what it does:

    In series:
    It takes the name of your file to add to plex which is handy if Plex Metadata agents do not recognize the file. In this case you probably have a special file you named yourself actually would like the file to be named this way in Plex.
    Say you have a file names "13x0713 Today is my Birhtday.avi"
    Current Plex behavior in the series is to name your file "episode 713" on season 13, episode 713
    The custom scanner will add your file as "Today is my Birthday" on season 13, episode 713

    It adds episodes to Plex from your multi-episodes files
    You have a file named: "S01E01-E03 Pilot.avi"
    Custom scanned will add Episode 01, Episode 02 and Episode 03 to Plex instead of just Episode 01. Then TheTVdb will provide the proper title for each episode and while browsing your season you won't miss any episode.

    It allows you to add a file you name .plexignore anywhere you want to have the scanner ignore the folder you have this file in.

    The full explanation (in french) here.

    Remove the .txt to the file as it is a 7zip archive.
  • gitsgits Posts: 32Members ✭✭

    Just got the updated files w/ root=None, so, the initial post Scanners.7z has been updated to v2.1... here

Sign In or Register to comment.