Jump to content


Photo

[Patch] Plex Series Scanner.py


  • Please log in to reply
6 replies to this topic

#1 gits

gits

    Member

  • Members
  • PipPip
  • 30 posts
  • Location: Paris, France

Posted 07 December 2012 - 02:57 AM

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)

PMS : 0.9.8.10.215 | NAS Synology DS-1812+ (DSM 4.3 | RAID6 8x3TB WD30EFRX)

PMC : LG Smart TV (42LW570S | 55LG5590) | P4A 3.1.4.39 (Mele A1000G | Cubiboard | SGS2 | SGN2)

Topics Custom Plex Scanners


#2 gits

gits

    Member

  • Members
  • PipPip
  • 30 posts
  • Location: Paris, France

Posted 10 December 2012 - 07:23 AM

replaced by Custom Plex Scanner
use google translation from french to your language to understand comments.

PMS : 0.9.8.10.215 | NAS Synology DS-1812+ (DSM 4.3 | RAID6 8x3TB WD30EFRX)

PMC : LG Smart TV (42LW570S | 55LG5590) | P4A 3.1.4.39 (Mele A1000G | Cubiboard | SGS2 | SGN2)

Topics Custom Plex Scanners


#3 wally007

wally007

    Rock Star

  • Members
  • PipPipPipPipPip
  • 991 posts

Posted 10 December 2012 - 08:19 PM

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 :-))

replaced by Custom Plex Scanner
use google translation from french to your language to understand comments.



#4 gits

gits

    Member

  • Members
  • PipPip
  • 30 posts
  • Location: Paris, France

Posted 12 December 2012 - 05:22 PM

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.

PMS : 0.9.8.10.215 | NAS Synology DS-1812+ (DSM 4.3 | RAID6 8x3TB WD30EFRX)

PMC : LG Smart TV (42LW570S | 55LG5590) | P4A 3.1.4.39 (Mele A1000G | Cubiboard | SGS2 | SGN2)

Topics Custom Plex Scanners


#5 wally007

wally007

    Rock Star

  • Members
  • PipPipPipPipPip
  • 991 posts

Posted 12 December 2012 - 07:40 PM

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 :-(

#6 Ismelda

Ismelda

    Dedicated Member

  • Members
  • PipPipPip
  • 375 posts

Posted 13 July 2013 - 04:39 PM

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.

Attached Files


My Movies(alt)-Series(alt)-Animes(alt)
PMS: QNAP 809 Pro (x3) | QNAP 879 Pro | QNAP 1079 Pro
PHT: Windows 7 - RARflix: Roku 2XS - Plex for Android: Nexus 7 (2013)
I love Plex!


#7 gits

gits

    Member

  • Members
  • PipPip
  • 30 posts
  • Location: Paris, France

Posted 14 July 2013 - 02:02 AM

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


PMS : 0.9.8.10.215 | NAS Synology DS-1812+ (DSM 4.3 | RAID6 8x3TB WD30EFRX)

PMC : LG Smart TV (42LW570S | 55LG5590) | P4A 3.1.4.39 (Mele A1000G | Cubiboard | SGS2 | SGN2)

Topics Custom Plex Scanners





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users