Regex in plex media server

Hi,

 

I'd like to know what is the regex used for files without any season information, like for example this file :

 

"[Fansub]foo-234 720p.mp4"

 

I took a look to the following documentation => http://wiki.plexapp.com/index.php/Advancedsettings.xml#.3Ctvshowmatching.3E   but this regex doesn't match what I want but pms do it and I don't know.

 

Cheers

 

Hi,

I'd like to know what is the regex used for files without any season information, like for example this file :

"[Fansub]foo-234 720p.mp4"

I took a look to the following documentation => http://wiki.plexapp.com/index.php/Advancedsettings.xml#.3Ctvshowmatching.3E   but this regex doesn't match what I want but pms do it and I don't know.

Cheers

episode_regexps = [
    '(?P.*?)[sS](?P[0-9]+)[\._ ]*[eE](?P[0-9]+)([- ]?[Ee+](?P[0-9]+))?',                           # S03E04-E05
    '(?P.*?)[sS](?P[0-9]{2})[\._\- ]+(?P[0-9]+)',                                                            # S03-03
    '(?P.*?)([^0-9]|^)(?P[0-9]{1,2})[Xx](?P[0-9]+)(-[0-9]+[Xx](?P[0-9]+))?',                       # 3x03
    '(.*?)[^0-9a-z](?P[0-9]{1,2})(?P[0-9]{2})([\.\-][0-9]+(?P[0-9]{2})([ \-_\.]|$)[\.\-]?)?([^0-9a-z%]|$)' # .602.
  ]
 
date_regexps = [
    '(?P[0-9]{4})[^0-9a-zA-Z]+(?P[0-9]{2})[^0-9a-zA-Z]+(?P[0-9]{2})([^0-9]|$)',                # 2009-02-10
    '(?P[0-9]{2})[^0-9a-zA-Z]+(?P[0-9]{2})[^0-9a-zA-Z(]+(?P[0-9]{4})([^0-9a-zA-Z]|$)', # 02-10-2009
  ]
 
standalone_episode_regexs = [
  '(.*?)( \(([0-9]+)\))? - ([0-9]+)+x([0-9]+)(-[0-9]+[Xx]([0-9]+))?( - (.*))?',  # Newzbin style, no _UNPACK_
  '(.*?)( \(([0-9]+)\))?[Ss]([0-9]+)+[Ee]([0-9]+)(-[0-9]+[Xx]([0-9]+))?( - (.*))?'   # standard s00e00
  ]
  
season_regex = '.*?(?P[0-9]+)$' # folder for a season
 
just_episode_regexs = [
    '(?P[0-9]{1,3})[\. -_]of[\. -_]+[0-9]{1,3}',       # 01 of 08
    '^(?P[0-9]{1,3})[^0-9]',                           # 01 - Foo
    'e[a-z]*[ \.\-_]*(?P[0-9]{2,3})([^0-9c-uw-z%]|$)', # Blah Blah ep234
    '.*?[ \.\-_](?P[0-9]{2,3})[^0-9c-uw-z%]+',         # Flah - 04 - Blah
    '.*?[ \.\-_](?P[0-9]{2,3})$',                      # Flah - 04
    '.*?[^0-9x](?P[0-9]{2,3})$'                        # Flah707
  ]
 
ends_with_number = '.*([0-9]{1,2})$'
 
ends_with_episode = ['[ ]*[0-9]{1,2}x[0-9]{1,3}$', '[ ]*S[0-9]+E[0-9]+$']

To be honest, not sure if all are used.

You best bet is to name per naming guide

http://wiki.plexapp.com/index.php/Media_Naming_and_Organization_Guide

with source data from www.thetvdb.com (which always has a season)

nice :)

thx !

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.