Sorting by Date Instead of Episode Number

So when I add a new episode to Plex that does not have metadata from thetvdb yet (I hear it takes 24 hours for updates on thetvdb to update to plex proxy,) instead of putting it in order by episode, it puts it at the beginning of the season. I am assuming that is since it doesn’t have a date aired. Plex seems to be sorting by air date now instead of episode number. I am not sure when this changed but would like to be able to sort by episode number.

Yeah, I’ve just updated the Plex Server and immediately noticed this. Plex is now sorting by the airdate and totally ignoring the SxxExx information. Which completely breaks something like the TV Show Firefly (which was aired out of order), even when using the DVDOrderAgent plug-in.

Is this a glitch, or intentional? And is there any way to get it back to sorting by episode number?

This is a particularly annoying development. I can understand that in some cases, order by air date may be a desired option (lots of posts about the Doctor. Who series with specials aired between regular episodes) but I am pretty sure that in most user cases, the preferred order would be by episode number.

@Shaffer’s said:
So when I add a new episode to Plex that does not have metadata from thetvdb yet … instead of putting it in order by episode, it puts it at the beginning of the season. I am assuming that is since it doesn’t have a date aired. Plex seems to be sorting by air date now instead of episode number. I am not sure when this changed but would like to be able to sort by episode number.

I thought that too, but an unknown aired date goes to the top, even though Plex recognizes the episode number from the file name. But it does sort the rest of the season by aired dated, so that it can appear completely random.

@smnhlb said:
Yeah, I’ve just updated the Plex Server and immediately noticed this. Plex is now sorting by the airdate and totally ignoring the SxxExx information. Which completely breaks something like the TV Show Firefly (which was aired out of order), even when using the DVDOrderAgent plug-in.

Is this a glitch, or intentional? And is there any way to get it back to sorting by episode number?
ARGGHHH! I have a couple of series that I use the DVDOrderAgent for and they are all screwed up now. Why would the try to fix something that wasn’t broken?

This is annoying, please fix

Agreed, several series rely on DVD order instead of air order. Please return the default to sorting by episode name. I can see the benefit to sorting by date though, so it could be nice to have the option to change this on a per-show basis

@PartyMummy said:
Agreed, several series rely on DVD order instead of air order. Please return the default to sorting by episode name. I can see the benefit to sorting by date though, so it could be nice to have the option to change this on a per-show basis

An ‘Option’? Surely, you jest.

1 Like

Jumping in here to try and gather information and see where things are going sideways?

I’m trying to recreate what I’m seeing (having had this brought to my attention). If I can recreate it, just as you all see it, we can get something done.

First, let me ask / sort out:

  1. MKV vs MP4 and Has all the title / other embedded information been removed from the files or is it still in there?

  2. Is the source from DVD or OTA?

  3. How were the names assigned? Manually, or a tool like FileBot? If FileBot, was DVD order selected when renaming that media pulled in from the DVD?

Now for the big part…

Can you help me create, with as few pieces / exact names as possible, something to recreate this with?

As example, using shell script, I can create an entire ‘fake’ season of a tv show.

#!/bin/sh

for i in 01 02 03 04 05 06 07 08 09 10
do
  echo `date` this is just some random text to give the file length `date` >  SeriesNameHere.S01E${i}.mkv
done

I now have 10 episodes to run through the scanner and Plex Web. I can also run them through FileBot and use it’s Preferences for DVD versus Air Date.

Anyone care to help?

I think you’re talking to users in dev-speak. @leelynds might get it, but it’s not doing a lot for me.

I am willing to help, but tone it down. :slight_smile:

Create the Show Firefly as it is listed at TVDB in the aired order. You, of course, know that’s bass-akwards from the original intended order the creator designed the show around. We’re combating this circumstance with the DVDOrderAgent. Everything was fine up until an update or so ago. Things went down the toilet. The episodes are no longer obeying the order DVDOrderAgent put them in.

Files are named with Filebot - perfectly - as are the folder structures:
G:\TV SciFi
…Firefly
…Season 1\ (sorry about that missing ‘0’, I’ll get to it later)
…Firefly - S01E02 - The Train Job.mp4
and so on

But:

As you can see they’re now all whacked out (user-speak). DVDOrderAgent gave them the right names, but Plex insists that the aired order is right - and that’s just wrong.

All files expertly cleansed of all metadata. You’re talking to quite a few veterans here.

Honestly? I couldn’t care less about the leading ‘0’ but ok.. if you want to fix it :slight_smile:

I have this:

[chuck@lizum Firefly.106]$ ll
total 12
drwxr-xr-x  3 chuck users 4096 Oct 22 21:39 ./
drwxr-xr-x 26 chuck users 4096 Dec 11 03:15 ../
drwxr-xr-x  2 chuck users 4096 Apr  2  2016 Season 01/
[chuck@lizum Firefly.107]$ cd Season\ 01/
[chuck@lizum Season 01.108]$ ll
total 3962324
drwxr-xr-x 2 chuck users      4096 Apr  2  2016 ./
drwxr-xr-x 3 chuck users      4096 Oct 22 21:39 ../
-rw-r--r-- 1 chuck users 539417324 Nov 20 23:26 Firefly.S01E01.The Train Job.mkv
-rw-r--r-- 1 chuck users 265786050 Nov 20 23:26 Firefly.S01E02.Bushwhacked.mkv
-rw-r--r-- 1 chuck users 273269823 Nov 20 23:26 Firefly.S01E03.Our Mrs. Reynolds.mkv
-rw-r--r-- 1 chuck users 273677865 Nov 20 23:26 Firefly.S01E04.Jaynestown.mkv
-rw-r--r-- 1 chuck users 266135188 Nov 20 23:26 Firefly.S01E05.Out of Gas.mkv
-rw-r--r-- 1 chuck users 273307981 Nov 20 23:26 Firefly.S01E06.Shindig.mkv
-rw-r--r-- 1 chuck users 273495121 Nov 20 23:26 Firefly.S01E07.Safe.mkv
-rw-r--r-- 1 chuck users 273448693 Nov 20 23:26 Firefly.S01E08.Ariel.mkv
-rw-r--r-- 1 chuck users 266579193 Nov 20 23:26 Firefly.S01E09.War Stories.mkv
-rw-r--r-- 1 chuck users 267078044 Nov 20 23:26 Firefly.S01E10.Objects in Space.mkv
-rw-r--r-- 1 chuck users 272152840 Nov 20 23:26 Firefly.S01E11.Serenity.mkv
-rw-r--r-- 1 chuck users 274468336 Nov 20 23:26 Firefly.S01E12.Heart of Gold.mkv
-rw-r--r-- 1 chuck users 264209987 Nov 20 23:26 Firefly.S01E13.Trash.mkv
-rw-r--r-- 1 chuck users 274352503 Nov 20 23:26 Firefly.S01E14.The Message.mkv
[chuck@lizum Season 01.109]$ 

Which gives me:

What am I missing?

Clearly you are not a Firefly Fan.

Look at the image I posted above. Those episode numbers are in the DVD Order that the DVDOrderAgent put them in. The Train Job is Episode 2, Serenity is Episode 1. The DVDOrderAgent has them named properly, but Plex is insisting the aired order is correct.

We even have them named according to the DVD Order. DVDOrderAgent sorts them according to the DVD Order so all the downloaded information matches the correct episode.

As they appear in my library:

It’s not the Agent which is the problem, It’s how Plex/Web is displaying them?

As plain and obvious as my cough nose?

Yea, pretty much.

The PMS version immediately preceding this one: Version 1.3.2.3112 - is where the trouble started. Up until that time everything was cool.

Have I recreated the problem correctly?

Yep, that looks like the problem to me, but these other guys in this thread may want to expand on that. I was involved in this particular thread: https://forums.plex.tv/discussion/248543/tv-episode-sort-order-changed-in-latest-pms-version#latest , but @leelynds has been here too.

Seems like the same problem.

To help with what little sanity I have, may I ask we try to focus in one place?

I’m already chatting with folks and rattling a few cages… errr… asking questions :smiley:

@ChuckPa - I think this is what you wanted, it’s my file structure exactly for Firefly, including the Season 00 folder. Looks like you and @JuiceWSA have it sorted already though

FYI - the specials folder that I have has more episodes than the TVDB lists, because I ripped all of the extras and assigned episode numbers and manually edited titles and summary.I gave the ripped extras an arbitrary date of 2003-12-09, which probably made sense at the time, but that reason is now forgotten

Also, the actual mp4 files have no metadata except language tags for the audio track. There is also a sidecar srt file for all of the season 1 episodes and a couple of the season 0 episodes. I’m sure the subs are irrelevant.

While your …errrr… asking questions, why do the season posters and thumbs for episodes not listed at the TVDB work here with the DVDOrderAgent, but not with the default TVDB agent when an episode isn’t listed. Just askin…

and a screenshot of the specials folder, that has jumbled up all of the episodes

@ChuckPa said:
It’s not the Agent which is the problem, It’s how Plex/Web is displaying them?

Just to make sure it’s not overlooked, the apps display the same way. Not just Plex Web. Tested on Roku, Roku classic, Roku RarFlix, and PMP. So it would seem data sent from the server, rather than an individual client

@leelynds

Thank you for that! Greatly appreciated!

I’ve asked and here’s what I’m coming away with.

  1. TheTVDB doesn’t allow, for whatever reason, “DVD Collections”. They seem stuck on Air-date ONLY. IF they allowed FireFly (DVD), you could simply rename your series to be that and all would be done. It would fall right in place with The Flash (2014) and others. PMS wouldn’t even see and difference. It wouldn’t care at all.
  2. I observed PMS matching based on the as-given DVD order; displaying the DVD episode names in Air-date order. This is what you’re seeing and why Serenity is way down the list and not displayed as EP position 1 when properly named Episode 1.
  3. Where it gets disturbing and what I must dig deeper on now: After a metadata refresh, my carefully-crafted names were ignored. The TVDB entries had completely taken over. I’ve chatted with a few folks about this. Trying to figure out a viable solution is not easy. As I see it, there would have to be another column (field) created in the database for every series and then the UI presence to display and change that flag… Doable? Yes. Easily? Unknown. Timeframe? No clue.

This is where I stand at present and where my thinking is headed.

Please help me adjust / correct as needed.

What you are describing is a new “Feature” of PMS. It would seem to me by the number of posts in the last couple of weeks, that something changed recently in the server that forces the Air Date sorting, regardless of the agent used. That did not happen before unless you explicitly filtered by air date or recently added in the library view. Episodes were displayed in a logical numerical order. I think there are a couple of threads that mention reverting to Plex Media Server 1.2.7 corrects the problem, including the missing images.

Even if we accept that is the new norm (which I will hate doing) it doesn’t explain missing posters, missing episode thumbnails, and putting an un-matched episode at the top of the list, when Plex clearly identifies the new episode number from the file name, and displays that correctly.

All of that happens with the DEFAULT TVDB agent. So it’s not just third party agents causing the glitch.

Basically, what everyone is saying, something has changed in the server. You have pretty much proven the agents work correctly, but the server is ignoring that information, and stubbornly sorting by date aired.

I really appreciate your attention to this matter @ChuckPa . I don’t want it to become the accepted normal with a work around that we have to manually edit Air Dates to trick Plex into displaying episodes correctly. Been there with work-arounds for the 50 episode Recently Added Televison glitch.