[Feature Request] Allow for TV folder hierarchy to be more flexible

#Request


Lots of people have lots of different folder structures for their libraries. As such, I believe Plex should try to be as flexible as possible with supported hierarchies.

#Currently Supported TV Hierarchy


##Episode-based naming:

0  {Plex library root folder path}/{root folder}
1      /{Show Name}
2          /Season {XX}
3              /{Show Name} - s{XX}e{YY} - {Optional Info}.{ext}

##Date-based naming:

0  {Plex library root folder path}/{root folder}
1      /{Show Name}
2          /Season {XX}
3              /{Show Name} - {YYYY}-{DD}-{MM} - {Optional Info}.{ext}
3              /{Show Name} - {YYYY}.{DD}.{MM} - {Optional Info}.{ext}
3              /{Show Name} - {YYYY} {DD} {MM} - {Optional Info}.{ext}
3              /{Show Name} - {MM}-{DD}-{YYYY} - {Optional Info}.{ext}
3              /{Show Name} - {MM}.{DD}.{YYYY} - {Optional Info}.{ext}
3              /{Show Name} - {MM} {DD} {YYYY} - {Optional Info}.{ext}

#Definitions


Encapsulating punctuation: Any pair of punctuation that can denote the begin and end of a set of information. This set consists of parentheses ("(" and “)”), curly brackets ("{" and “}”), square brackets ("[" and “]”), and angle brackets ("<" and “>”).

Spacing punctuation: Refers to the following punctuation: space (" “), underscore (”_"), dash ("-"), em dash ("—"), and period (".").

Episode identifier: There are two episode identifiers: one is for episode-based shows and the other is for date-based shows. Episode based shows currently must be identified by the “sXXeYY” format. Date based shows currenlty must be identified by the “YYYY-MM-DD” format or the “MM-DD-YYYY” format (where the dashes ("-") can also be periods (".") or spaces (" ")).

Anatomy of an episode file name: An episode file name is made up of 5 parts (4 distinct parts). These parts are (1) the show’s name, (2) a seperator, (3) the episode identifier, (4) a separator, and (5) optional information. Part 4 and 5 are optional.

#Proposed Changes


Based on my original setup before using plex, and seeing other’s hierarchies, below are several proposed changes for adding flexibility and accomodating as many libraries as possible:

##Level 0

  • This is simply a defined directory in the Plex settings. Nothing to change here.

##Level 1

  • PC01: Allow for adding the year of the show using encapsulating puncuation and optional spacing punctuation.
  • Example: The Tomorrow People(2013), The Tomorrow People{2013}, The Tomorrow People[2013], The Tomorrow People<2013>, The Tomorrow People (2013), The Tomorrow People {2013}, The Tomorrow People [2013], The Tomorrow People <2013>, The Tomorrow People_(2013), The Tomorrow People-{2013}, The Tomorrow People—[2013], The Tomorrow People.<2013>, The Tomorrow People_(2013), The Tomorrow People-{2013}, The Tomorrow People—[2013], The Tomorrow People.<2013>, The Tomorrow People_(2013), The Tomorrow People-{2013}, The Tomorrow People—[2013], The Tomorrow People.<2013>, The Tomorrow People_(2013), The Tomorrow People-{2013}, The Tomorrow People—[2013], The Tomorrow People.<2013>, The Tomorrow People_(2013), The Tomorrow People-{2013}, The Tomorrow People—[2013], and The Tomorrow People.<2013> are all acceptable folder names for this level and are able to denote the show’s name as “The Tomorrow People” and the show’s year as 2013.
  • PC02: Spaces can be tricky in OS paths. Many times, when preforming actions on a library from the OS, escape characters or quoting must be used when referencing paths that have spaces in them. In light of this, allowing for spacing punctuation to take place of spaces could help alleviate this common headache of maintaining libraries.
  • Example: The Tomorrow People, The_Tomorrow_People, The-Tomorrow-People, The—Tomorrow—People, and The.Tomorrow.People are all acceptable folder names for this level and are able to denote the show’s name as “The Tomorrow People”.

##Level 2

  • PC03: Apply the logic of PC02 to this level: allow spaces to be replaced with spacing punctuation.
  • Example: Season 01, Season_01, Season-01, Season—01, and Season.01 are all acceptable folder names for this level and are able to denote the folder is for “Season 1”.
  • PC04: Allow for this directory name to be case insensitive.
  • Example: Season 01 and season 01 are both acceptable folder names for this level and are able to denote the folder is for “Season 1”.
  • PC05: Allow for different directory names. We know these are going to be seasons, so why the need to spell out “Season”? Why not just put a “S” or “s”. Or Just allow for the Folder to be a number.
  • Example: S1, S01, S001, s1, s01, s001, 1, 01, and 001 are all acceptable folder names for this level and are able to denote the folder is for “Season 1”.

##Level 3

  • PC06: For a date-based episode identifier, allow the seperator to be any spacing punctuation.
  • Example: Jimmy Kimmel - 2017 01 02.mkv, Jimmy Kimmel - 2017_01_02.mkv, Jimmy Kimmel - 2017-01-02.mkv, Jimmy Kimmel - 2017—01—02.mkv, Jimmy Kimmel - 2017.01.02.mkv, Jimmy Kimmel - 01 02 2017.mkv, Jimmy Kimmel - 01_02_2017.mkv, Jimmy Kimmel - 01-02-2017.mkv, Jimmy Kimmel - 01—02—2017.mkv, and Jimmy Kimmel - 01.02.2017.mkv are all acceptable file names for this level and are able to denote the show’s name as “Jimmy Kimmel” and the show’s date as January 2nd, 2017.
  • PC07: For an episode-based episode identifier, allow for case insensitivity.
  • Example: The Tomorrow People - s01e01.mkv and The Tomorrow People - S01E01.mkv are both acceptable file names for this level and are able to denote the file is for a show named “The Tomorrow People” and is the first episode of the first season.
  • PC08: Apply the logic of PC02 to this level: allow the space in the show’s name to be replaced with spacing punctuation.
  • Example: The Tomorrow People - s01e01.mkv, The_Tomorrow_People - s01e01.mkv, The-Tomorrow-People - s01e01.mkv, The—Tomorrow—People - s01e01.mkv, and The.Tomorrow.People - s01e01.mkv are all acceptable file names for this level and are able to denote the show’s name as “The Tomorrow People” and is the first episode of the first season.
  • PC09: Allow for the removal of the separators in an episode file name through the use of encapsulating punctuation and optional spacing punctuation.
  • Example: The Tomorrow People(s01e01)(1080P).mkv, The Tomorrow People{s01e01}{1080P}.mkv, The Tomorrow People[s01e01][1080P].mkv, The Tomorrow People<s01e01><1080P>.mkv, The Tomorrow People (s01e01) (1080P).mkv, The Tomorrow People {s01e01} {1080P}.mkv, The Tomorrow People [s01e01] [1080P].mkv, The Tomorrow People <s01e01> <1080P>.mkv, The Tomorrow People_(s01e01)_(1080P).mkv, The Tomorrow People_{s01e01}_{1080P}.mkv, The Tomorrow People_[s01e01]_[1080P].mkv, The Tomorrow People_<s01e01>_<1080P>.mkv, The Tomorrow People-(s01e01)-(1080P).mkv, The Tomorrow People-{s01e01}-{1080P}.mkv, The Tomorrow People-[s01e01]-[1080P].mkv, The Tomorrow People-<s01e01>-<1080P>.mkv, The Tomorrow People—(s01e01)—(1080P).mkv, The Tomorrow People—{s01e01}—{1080P}.mkv, The Tomorrow People—[s01e01]—[1080P].mkv, The Tomorrow People—<s01e01>—<1080P>.mkv, The Tomorrow People.(s01e01).(1080P).mkv, The Tomorrow People.{s01e01}.{1080P}.mkv, The Tomorrow People.[s01e01].[1080P].mkv, and The Tomorrow People.<s01e01>.<1080P>.mkv are all acceptable file names for this level and are able to denote the show’s name as “The Tomorrow People”, that it is the first episode of the first season, and it’s extra information is that the file has a 1080P resolution
  • PC10: Allow for optional folders at this level. The folders at this level would have the same name requirements as the actual episode files at this level (except the folder would not have the extension of the file). Allowing folders at this level allows for episodes with multiple files (for example: stacked episodes or local subtitle files) to be grouped together. Why do this you might ask? Because it is a logical extension of the hierarchy already in place and can be seen with both the show and season folders. The name of an episode file already specifies the show name and season number; yet we have show folders and season folders in order to group together episode files per show and season. By logical extension, we should be able to have an episode folder to group together the files for an episode.
  • Example:
0  {Plex library root folder path}/{root folder}
1      /The Tomorrow People
2          /Season 01
3              /The Tomorrow People - s01e01
4                 /The Tomorrow People - s01e01.mkv
4                 /The Tomorrow People - s01e01.en.srt

#Notes


  • All proposed changes are fully autonomous; no proposed change requires any of the other proposed changes in order to be implemented.
  • All examples for proposed changes opperate on the notion of the current hierarchy principles at the time of writing this. In other words, no example expects any of the other proposed changes to be in place.
  • PC04 and PC07 may already be supported, but it is not explicitly mentioned in the documentation
  • While no proposed changes are dependent on other proposed changes, the following proposed changes are necessary in order for end users to be able to completely remove spaces from their file paths and still be supported by plex:
  • PC01
  • PC02
  • PC03 or PC05
  • PC08
  • PC09

#Conclusion


I have put a lot of thought and work into this. I have assured that all proposed changes can operate independent of eachother and that the proposed changes would not break current functionality. If there are any problems with any of my proposals, please let me know and I will try to come up with a better solution. While more complex, I believe this will end up helping end users in the long run and allow for more people to more easily adopt the awesome software that is Plex!