# About the wrong sorting of episodes in the plex program

**URL:** https://forums.plex.tv/t/about-the-wrong-sorting-of-episodes-in-the-plex-program/828970
**Category:** Plex Media Server
**Tags:** server-qnap, ios-legacy, plex-web
**Created:** [January 31, 2023, 6:31am UTC](https://forums.plex.tv/t/about-the-wrong-sorting-of-episodes-in-the-plex-program/828970 "2023-01-31T06:31:50Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![MUGENG](https://avatars.discourse-cdn.com/v4/letter/m/7c8e57/32.png) [@MUGENG](https://forums.plex.tv/u/MUGENG)
#### Post date: [January 31, 2023, 6:31am UTC](https://forums.plex.tv/t/about-the-wrong-sorting-of-episodes-in-the-plex-program/828970/1 "2023-01-31T06:31:50Z")

</div>

It seems to be related to the wrong logic of the role of filters and classification rules in the client/web side.  
When I choose to sort by “Date Last Episode Added” in the categories of the library page, it displays the episodes in the correct order. But when I add an item in the filter - for example to filter based on which country the episode is from, then I still choose to sort by “last episode added date”, it doesn’t sort correctly. Logically speaking, after I sort by date of addition, I add a filter at this time, which should only eliminate episodes that are not in the country I selected based on the previous sort. But in fact, not only that, it also messes up the sort order, and I’m not sure what it sorts after filtering the country.

---

<div class="post-metadata">

### Author: ![BigWheel](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/bigwheel/32/78783_2.png) [@BigWheel](https://forums.plex.tv/u/BigWheel)
#### Post date: [January 31, 2023, 7:44am UTC](https://forums.plex.tv/t/about-the-wrong-sorting-of-episodes-in-the-plex-program/828970/2 "2023-01-31T07:44:34Z")

</div>

That is odd. I am not 100% positive but suspecting that when viewing `Country``TV Shows` `Last Episode Date Added` is only considering the the first season of any given show. so the last episode date added of season 1

In any case definitely something not right going on. Thanks for report.

---

<div class="post-metadata">

### Author: ![SwiftPanda16](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/swiftpanda16/32/81839_2.png) [@SwiftPanda16](https://forums.plex.tv/u/SwiftPanda16)
#### Post date: [January 31, 2023, 7:48am UTC](https://forums.plex.tv/t/about-the-wrong-sorting-of-episodes-in-the-plex-program/828970/3 "2023-01-31T07:48:05Z")

</div>

I reported a very similar issue a year ago.

> [@TV series Smart Collection sort order](https://forums.plex.tv/t/tv-series-smart-collection-sort-order/768056/8):
>
> @tom80H I am able to confirm there is a bug with smart collection sorting using the “Last Episode Date Added” when combined with advanced filters for shared users. This bug only occurs within a smart collection of shows (i.e. query parameters type=2&sort=episode.addedAt:desc). A smart collection of episodes is sorted correctly. There must be at least one advanced filter applied. The exact filter does not matter, and any filter will produce this bug. If a shared user goes into the library and …
