Is it just me, or is the preferred TV episode naming scheme a touch ridiculous?

The only thing Plex needs from a show is season# and episode#
Here is one example I gave many moons ago to show how lenient Plex can be.

! \Cheers (1982)\Season 01\He said he was not there yesterday; however, many people saw him there - 01x01 - Some Title Name.avi
! \Cheers (1982)\Season 01\I am never at home on Sundays - Season-01xEpisode-02 - Some Title Name.avi
! \Cheers (1982)\Season 01\I checked to make sure that he was still alive - Season01xEpisode03 - Some Title Name.avi
! \Cheers (1982)\Season 01\It didn’t and they don’t recommend anyone else do it either - s01e04.avi
! \Cheers (1982)\Season 01\ s01e05 - It was getting dark, and we weren’t there yet - Some Title Name.avi
! \Cheers (1982)\Season 01\Malls are great places to shop; I can find everything I need under one roof - s01e06 - Some Title Name.avi
! \Cheers (1982)\Season 01\Rock music approaches at high velocity - s01e07 - Some Title Name.avi
! \Cheers (1982)\Season 01\The mysterious diary records the voice - s01e08 - Some Title Name.avi
! \Cheers (1982)\Season 01\The old apple revels in its authority - s01e09 - Some Title Name.avi
! \Cheers (1982)\Season 01\The sky is clear; the stars are twinkling - s01e10 - Some Title Name.avi
! \Cheers (1982)\Season 01\We have never been to Asia, nor have we visited Africa - s01e11 - Some Title Name.avi
! \Cheers (1982)\Season 01\We need to rent a room for our party - s01e12 - Title. We need no stinking title.avi
!

I’m absolutely gonna bring on the complaint police on this one, lol


So, you could append sXXeXX to the end of your filename and Plex should organize them correctly.
01 Doll No. 123.mp4 → 01 Doll No. 123 (s01e01).mp4
This is not 100% what you wanted but it’s close and you can keep your filename nomenclature, kinda


@Ddoody said:

@HitsVille said:
The bottom line is Plex insists that TV shows are named according to the TVDB and FileBot has already been mentioned and can rename several terabytes in a matter of minutes. It really isn’t difficult. Adapt to the required naming or just move on.

No, the bottom line is that Plex shouldn’t be insisting on anything.

Actually YES. It does, regardless of what you feel it should or shouldn’t do, it DOES!
So yeah i kind of already figured. It’s all about you.

So stop attempting to shift blame for this fiasco onto the TVDB. This is all Plex.

WTF are you even on about? Yes Plex chose to require TVDB naming. Where did i suggest otherwise? Where did i say there is an issue with that? Where did I lay blame anywhere and why would I even want to lay blame anywhere when there isn’t even an issue?? Well maybe there is for the self entitled and needy. The fiasco is just in your mind it seems? Or surely Plex would be dead because of their stringent naming rules and we would all be using Emby
 Oh wait!!

I forgot to mention earlier Kodi is also happy with the Plex/Emby naming schemes, though definitely more lenient.
You seem determined not to tell us what a Library software is? You keep comparing Plex to all your other Library software. without offering any names that you are comparing with. I cant say i have ever heard Plex be called a library software before, but hell why not. Apples, Oranges
 they’re all fruit.

@AmazingRando24 said:
The reason why Plex works the way it does comes down to matching. There’s no real AI involved, so you have to hold its hand a bit with your structure. The important pieces it needs are Show name, Season Number and Episode Number. While it “can” pick these things up, it normally looks for them in specific places. Hence the reason for structure.

You don’t have to follow the structure. I just wouldn’t expect it to behave as intended if you don’t. Yes, it should serve up media in whatever structure you elect to use, but you’ll sacrifice matching your files to outside databases if you do. That’s your call.

All true, but the information for show name and season already exist in the path, and this is the structure Plex recommend. Why then duplicate that info in the file name? It is both wasteful and error prone (mismatch to the structure).

@NewPlaza said:
So, you could append sXXeXX to the end of your filename and Plex should organize them correctly.
01 Doll No. 123.mp4 → 01 Doll No. 123 (s01e01).mp4
This is not 100% what you wanted but it’s close and you can keep your filename nomenclature, kinda


Thanks, that format is at least more ‘human readable’. I am investigating creating a custom scraper as @Zuikkis has suggested, but this layout may be the best compromise if I can’t get the scraper working as I’d like.

Plex gets metadata from the TVDB for television shows. TVDB uses their own format (which pretty much every app like Plex adheres to). So, to get the metadata you follow the TVBD/Plex file naming structure. Personally, I don’t want the programmers having to add extra code to cater to every single person that doesn’t want to follow their naming convention - I’d rather they concentrate on fixing bugs and adding enhancements.

You either conform to their requirements, or you don’t and your media doesn’t get matched. This isn’t new, it’s been around as long as Plex has been around, and the requirements are all documented in their FAQ pages. It’s not going to change.

If Plex doesn’t meet your needs, you should explore other applications that best meet your needs.

@kegobeer-plex said:
Plex gets metadata from the TVDB for television shows. TVDB uses their own format (which pretty much every app like Plex adheres to). So, to get the metadata you follow the TVBD/Plex file naming structure. Personally, I don’t want the programmers having to add extra code to cater to every single person that doesn’t want to follow their naming convention - I’d rather they concentrate on fixing bugs and adding enhancements.

You either conform to their requirements, or you don’t and your media doesn’t get matched. This isn’t new, it’s been around as long as Plex has been around, and the requirements are all documented in their FAQ pages. It’s not going to change.

If Plex doesn’t meet your needs, you should explore other applications that best meet your needs.

The TVDB does not do the file name parsing and does not require, request or even suggest a naming scheme. It uses an API to deliver data. I have written apps that call this API myself. Plex supplies the already parsed show, series and episode to that API. That’s what Plex scrapers do. The TVDB has nothing to do with this issue.

However, I do get why Plex doesn’t want to support multiple naming schemes, but if their customers are asking for it - and I am by no means the first, else threads like this wouldn’t be so common - they really should provide it. If they are concerned with the many bug reports they would get if users could supply their own matching patterns (a perfectly reasonable expectation), they could at least offer a user selectable choice of several commonly requested schemes. This minimises support issues while still being more flexible. It shouldn’t be difficult to implement. It’s just a set of regular expression patterns, and possibly an enhanced scraper.

@kegobeer-plex said:
If Plex doesn’t meet your needs, you should explore other applications that best meet your needs.

Do you know of another media server that has clients available on a wide range of hardware? I need iOS, PS3, PS4, Roku and HTTP(S) support as a minimum, and Android would be useful as well.

No, I don’t know of anything better than Plex.

When I came onboard as a Plex user I read up on the naming convention and conformed to what it needed. If you want to take advantage of Plex, you’ll have to name things they way their naming convention requires. That’s the way it is.

Feel free to create (or add to an existing) feature request thread. If it receives enough likes (votes), the devs may consider it, but in no way is it a guarantee.

@HitsVille said:
WTF are you even on about? Yes Plex chose to require TVDB naming. Where did i suggest otherwise? Where did i say there is an issue with that? Where did I lay blame anywhere and why would I even want to lay blame anywhere when there isn’t even an issue?? Well maybe there is for the self entitled and needy. The fiasco is just in your mind it seems? Or surely Plex would be dead because of their stringent naming rules and we would all be using Emby
 Oh wait!!

Perhaps if you understood what is happening in the code you wouldn’t make this claim, that is basically wrong on the facts. The TVDB does not have, in any way shape or form, a naming scheme. It returns its data via an API that accepts show name, season and episode as parameters. Those parameters are extracted from the file path and name BY PLEX. That’s what Plex scrapers do. This is what I meant by laying the blame on the TVDB. The TVDB does not interpret the file names, Plex does. So you can’t suggest that Plex (or any other app) is simply using the naming scheme required by the TVDB, because the TVDB doesn’t have one. I know this. I have written apps that call the TVDB API. I have also looked at the Plex scraper code, and KNOW for a fact it is that Plex code that is interpreting the naming schema.

I forgot to mention earlier Kodi is also happy with the Plex/Emby naming schemes, though definitely more lenient.
You seem determined not to tell us what a Library software is? You keep comparing Plex to all your other Library software. without offering any names that you are comparing with. I cant say i have ever heard Plex be called a library software before, but hell why not. Apples, Oranges
 they’re all fruit.

It manages a library of media
 it is library software. Yes, it does more, it is also a streaming media server and now, a live TV player, but it is a media manager and that means a LIBRARY OF MEDIA.

Correction:
Above, where I said the TVDB API accepts show name, it only does this for the purposes of identifying a new show. Thereafter it uses the id number TVDB has assigned to the show. Therefore, to get episode information the API takes show id, season and episode. Otherwise, the same information applies.

@HitsVille , please calm down, you are acting stupid


@Ddoody made fair points:

  • It wouldn’t hurt anyone if the file scanner was configurable. Give the match line as regexp, for example

  • Plex can’t change Season/Episode match afterwards. Why is there no Fix Match -option on episode level, only for entire series?

Saying “if you need that, you should use some other software” is childish and unnecessary. It would apply to 99% of posts on this forum. “Plex crashes on Android” --> “Go use some other software that doesn’t do that!”

We want this thing to evolve and that does require user feedback. All feedback is positive feedback, from software developers view.

1 Like

@Ddoody said:

@Zuikkis said:
You could write your own scanner for the recordings. It’s quite simple, there are numerous examples to be found.

Most of my files are from VDR, and since VDR is working on the same directory it’s not possible to change the naming. Paths and filenames have no consistent meaning, all useful information is in “info” file inside each directory. Yet with custom scanner all this is parsed properly, and then TVDB Agent finds the correct metadata just fine.

Take a look at the source:
GitHub - Zuikkis/VDR-Plex: Plex scanner for VDR recordings

Thanks. The first truly useful (to me) suggestion. I know everyone else seems happy with the bastardised naming scheme Plex requests, but it’s just really poor. Anyone who has ever designed or maintained a database will get where I’m coming from. (that’s not to say they’d support my position, just that they’s understand it)

You seem to be of an odd mind set. Having done design, programming, database design and database support
I think you’ve got the wrong end of the stick.

Your media collection != a database
Your media collection == external data to be scraped for information to then be stored in a database

The rigid media collection naming and organisation constraints are designed to ensure that the data that winds up in your actual database is a good as it possibly can be. If I were to import data from an external source into my sql I would want that data ordered before I imported it. Sure, yeah I could write some regex, some functions, stored procs whatever to handle inconsistently formatted data, but when I can just say “format it correctly, or we’re not importing because that way we reduce the error rate to below unacceptable %”, I know which one I’ll pick

What Plex is basically saying is “Get your house in order before you try and get us to create data from it”.

I’m not a fan of many many things that Plex do. Them insisting on what is actually a very human readable format isn’t amongst my complaints.

I have hundreds of TV shows. If, heaven forbid, the files get munged up by something, reordered in a moment of mental collapse or a bad decision primed with a bottle of scotch - with the eminently specific file naming conventions of Plex I know exactly which file is for which show without having to do a whole lot of work.

@jungwirth said:
Sure, yeah I could write some regex, some functions, stored procs whatever to handle inconsistently formatted data, but when I can just say “format it correctly, or we’re not importing because that way we reduce the error rate to below unacceptable %”, I know which one I’ll pick

Plex series scanner does not require consistently formatted data. It accepts all kinds of input. In Linux, the python code is located in:
/usr/lib/plexmediaserver/Resources/Plug-ins-a39b25852/Scanners.bundle/Contents/Resources/Series/Plex\ Series\ Scanner.py

Some notes:

  • There is a number of episode_regexp’s right at the start, it accepts all kinds of formats and new regexp could be easily added.
  • It seems to first parse the file name. If no season/episode match is found, the search is extended to the directory names.

The problem with @Ddoody 's example “01 Doll No. 123.mp4” is that Plex scanner finds 123 and thinks that it means Season 1 episode 23. After that it does not continue the search to directory name. I guess other episodes of Victoria are matched correctly?

episode_regexps = [
 ... 
    '(.*?)[^0-9a-z](?P<season>[0-9]{1,2})(?P<ep>[0-9]{2})([\.\-][0-9]+(?P<secondEp>[0-9]{2})([ \-_\.]|$)[\.\-]?)?([^0-9a-z%]|$)' # .602.
  ]

It is this regexp that matches “123”. If you don’t need that kind of format, you could just delete the line and it would probably OK after that. “123” seems very rare season/episode-format anyway, has anyone ever seen a file named like this? IMHO this really is an example of what you are accusing @Ddoody , Plex trying to accept too wide range of filename conventions which simply causes more problems because of false positive matches.

Note that if you do changes directly to this file, they will be probably overwritten by next Plex update. But you can copy this to:
“/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Scanners/Series/” -directory (on Linux), using a different name.

Oh, if regexp’s are a mystery to you, like they are to most normal people, there is a cool site https://regexr.com/ that allows you to test regexp’s in realtime. In Plex case you need to remove the nonstandard “?P” markers. The site confirms that the above regexp matches “01 Doll No. 123.mp4” and gives season 1 ep 23


Huh, I just wrote a long post and it seems to be disappeared
 I’ll write again, this time keeping a local copy. :slight_smile:

@jungwirth said:
The rigid media collection naming and organisation constraints are designed to ensure that the data that winds up in your actual database is a good as it possibly can be. If I were to import data from an external source into my sql I would want that data ordered before I imported it. Sure, yeah I could write some regex, some functions, stored procs whatever to handle inconsistently formatted data, but when I can just say “format it correctly, or we’re not importing because that way we reduce the error rate to below unacceptable %”, I know which one I’ll pick

Actually you are wrong here, Plex accepts wide range of filename conventions and this is the main reason for @Ddoody 's original problem.

On Linux, the default series scanner is in:
/usr/lib/plexmediaserver/Resources/Plug-ins-a39b25852/Scanners.bundle/Contents/Resources/Series/Plex\ Series\ Scanner.py

Some notes:

  • There is a bunch of regexp at start matching all kinds of file and directory names. You could easily add your own.
  • The code first scans the filename. If no match is found, it expands the search to directory names.

@Ddoody 's problem file was “01 Doll No. 123.mp4”. This regexp matches the “123” part and thinks it’s season 1, ep 23:

'(.*?)[^0-9a-z](?P<season>[0-9]{1,2})(?P<ep>[0-9]{2})([\.\-][0-9]+(?P<secondEp>[0-9]{2})([ \-_\.]|$)[\.\-]?)?([^0-9a-z%]|$)' # .602.

I have never seen a filename with season/ep like that, in three digits together? You could just remove this line and Plex would parse it correctly, since it then would continue the search to directory name and find season there.

You can try out regexp’s in https://regexr.com/ site. You just need to remove the nonstandard ?P<season> tags.

This is exactly an example what you are blaming @Ddoody for. Plex is accepting to wide range of input filename syntaxes, which just causes problems with false positive matches!

Note that if you modify this scanner directly, it’s likely to be overwritten on next Plex update. However you could copy the file under different name in “/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Scanners/Series” - directory.

@jungwirth said:
You seem to be of an odd mind set. Having done design, programming, database design and database support
I think you’ve got the wrong end of the stick.

Your media collection != a database
Your media collection == external data to be scraped for information to then be stored in a database

Do you know how a file system functions? Of course it is a database. Ever examine a mail system database? Or a subversion (file versioning) database? Sets of files, both of them. Your definition of a database seems to be the narrowest one possible. There are other types of databases than SQL ones. Many, many different types.

What Plex is basically saying is “Get your house in order before you try and get us to create data from it”.

My house is in order thanks. Just not the order Plex is insisting on. And Plex is not “creating data”, it is cataloguing it. The media is the real data. The Plex database is metadata. Data about data.

I’m not a fan of many many things that Plex do. Them insisting on what is actually a very human readable format isn’t amongst my complaints.

If you think
./show name/season 01/showname s01e01 episode name.ext
is more human readable then
./show name/season 01/01 episode name.ext
I think your eyes need examining, especially when looking at a file folder:
showname s01e01 episode name.ext
showname s01e02 next episode.ext
showname s01e03 another episode.ext
...
vs
01 episode name.ext
02 next episode.ext
03 another episode.ext
...

With the Plex format, my brain has to ignore the “showname s01e” portion in every file name before it gets to the meaningful data, the episode number and name.

@jungwirth said:
If I were to import data from an external source into my sql I would want that data ordered before I imported it. Sure, yeah I could write some regex, some functions, stored procs whatever to handle inconsistently formatted data


Except my data is “ordered”. Every single file is named in the same manner. ALWAYS ./show name/series {ss}/{ee} episode name.ext. It could not be more ordered if I tried. I simply omit the redundant - potentially conflicting - data that Plex is insisting upon.

@Zuikkis said:
@Ddoody 's problem file was “01 Doll No. 123.mp4”. This regexp matches the “123” part and thinks it’s season 1, ep 23:

'(.*?)[^0-9a-z](?P<season>[0-9]{1,2})(?P<ep>[0-9]{2})([\.\-][0-9]+(?P<secondEp>[0-9]{2})([ \-_\.]|$)[\.\-]?)?([^0-9a-z%]|$)' # .602.

I have never seen a filename with season/ep like that, in three digits together? You could just remove this line and Plex would parse it correctly, since it then would continue the search to directory name and find season there.

Thanks, @Zuikkis, I have already copied the standard Plex scanner and started playing with their regex’s. My first thought is to simply insert my preferred regex ahead of the standard ones and then save the file as a custom scanner. I’ll let you know how that goes
 my python is pretty rusty.

@Zuikkis said:
@HitsVille , please calm down, you are acting stupid


Saying “if you need that, you should use some other software” is childish and unnecessary. It would apply to 99% of posts on this forum. “Plex crashes on Android” → “Go use some other software that doesn’t do that!”

Only i never said that. I asked about comparing Plex to various other software that he ALREADY apparently uses that isnt as “stupid” as Plex. Therefore i asked, so why use Plex?
But knock yourself out


We want this thing to evolve and that does require user feedback. All feedback is positive feedback, from software developers view.

Or put another way you want Plex to pander to a majority of two, who seemingly have an issue and one of them in particular shouts loudly.

There are plenty of things broken in Plex. This isnt one of them.

1 Like

@HitsVille said:
Only i never said that. I asked about comparing Plex to various other software that he ALREADY apparently uses that isnt as “stupid” as Plex. Therefore i asked, so why use Plex?

Not that it matters, nor do I need to explain it to you, but I use Plex because it meets most of my requirements and has clients for many hardware platforms. This name parsing is an issue for me, but - thus far - not a deal breaker.

As for other platforms, there have been many over the years. The last one was the TV Series plugin for Mediaportal. It too utilises the TVDB for metadata, and it has user-configurable file matching patterns. The patterns I set up there had no issues with my naming scheme. However, that system only serves the actual TV it is plugged in to (unless that has changed since I stopped using it) and I was getting sick of having multiple libraries to update every time I added new content.

I initially created this post almost as joke. I knew then what the preferred naming scheme was, and that Plex have said they won’t specifically cater for others. As a developer of software I found that a pretty piss poor position for them to take. No, the customer is not always right, but when you can add a feature that makes them happier with your product, you should do so when possible. Even if you personally think it’s a bad idea. It’s called “good business”.

I started to dig in on it because of two things:

  1. I like a good argument, and
  2. During this discussion I realised that - in this instance at least - I am right and Plex are wrong.

Or put another way you want Plex to pander to a majority of two, who seemingly have an issue and one of them in particular shouts loudly.

No, I simply want Plex to add this single feature that other similar platforms already support. And I’m sure you have seen many such requests in the forum. I know I have. It is hardly just two people.

There are plenty of things broken in Plex. This isn’t one of them.

In your opinion.

That’s OK. You don’t have to agree with me, but your attitude has been one of “this has been resolved already. Do as you are told or go away.”

Sorry, but it’s not resolved. Few things truly ever are. And I’m not going away. Why should I?

Hopefully I will resolve this for myself with a custom scraper. Perhaps then I will share it with the Plex community and the issue will actually be resolved. :smiley:

As a curiosity, should you feel inclined to share, what is it you feel is “broken” in Plex?

Hmmmm
I think the Plex naming convention is fine.
I was naming my files like that long before I started using Plex


I chose to name then that way so I would know what the heck they were.

Nice to know series name, episode name, season and episode number just by reading the filename.

Else one could misplace videos
 LOL

For me there are many many things Plex has done and is doing wrong but choosing the naming and structure for TV shows as they have is BY FAR not one of the mistakes. In fact the naming that Plex wants is the absolute best I have seen or tried to use. There is nothing better I have seen.

I originally had a different naming scheme when I first started with Plex but I used FileBot and a couple of other renaming tools and renamed everything I own to comply.

When I became frustrated with Plex and began mostly migrating to Emby I found that everything I had in Plex was perfectly compatible with Emby. That is nothing had to be renamed or re-matched using the exact same video TV and movie library of over 3000 movies and 509 TV shows with over 30000 episodes.

I also tested Kodi for a while and there too there was no need to changed a thing.

That is the three major, most used, video library managers that seem to really like the way Plex wants things named. That naming is also extremely human readable and just by looking at a single file name you know exactly what the series is and what season and what episode of that season is and even the name/title of the episode is optionally included.

I see no need for using any other scheme and no reason for Plex to add any flexibility in that regard. They already allow custom scrapers so the tiny minority that do not wish to conform their library have a way to scrape their library and get it into Plex.

Plex does need a LOT more choice in their system but in the support for alien naming schemes is not a place where Plex needs to put any resources.

If it ain’t broke then don’t fix it and scraping and importing TV series is not broken. It sometimes, usually because of some database glitch, does have a small problem and Plex still stupidly insists on placing “Local media assets” at the top of each agent list on initial install and that causes more screw-ups than anything else I know of as far as naming goes. But that is easily fixable and if that is the worst problem we have on a new install then it is truly unimportant.

The current naming requirements are quite fine and Plex does not need to expend any resources fixing what is not broken.

1 Like