Plex not sorting by duration correctly

I have an issue with my server that I can’t figure out.

Everytime I sort by Duration, this is the order I get.

Two longer movies before my shorter ones.
I’ve refreshed the metadata multiple times, that’s the only thing I can think to do.

Is there something else that’s causing this issue?

Analyzing media is what would update the duration. It’s also possible that there are multiple files matched to those titles, and while Plex is displaying the length of the shorter file, there’s a longer file also associated with it. You can use Get Info to see if what file(s) Plex has associated with an item.

No dice.
Still shows as it does in the screenshot. Anylized once on the server, and once my laptop, to no avail.
Also, I just have one version of each. So that’s not it.

Other ideas?

Just to double check, you explicitly used Get Info on those files to make sure Plex isn’t associating some other random file with the movie, even though there’s only one “real” version? You could also filter to duplicates to see if anything unexpected shows up. I ask because you’ll usually see something similar when you sort by Bitrate, where Plex does correctly sort from highest to lowest bitrate, but it might display a bitrate from a different, lower bitrate version:

Outside of that, the only other thing I can think of is that it’s some minor database corruption causing issues, but I’ve never seen database corruption cause something like that.

Does Optimize Database help at all ? https://support.plex.tv/articles/226836308-help

One of the things this does is rebuild the search indexes so it may or may not help with this situation. If not then I think some plex server logs after reproducing the issue might help pinpoint any problems (assuming no db corruption).

Oddly enough, the files that are not sorting properly have no bitrate attached to them. Don’t know if that’s significant.

Optimising Database didn’t have any effect either. :neutral_face:

Definitely seems related, since determining the duration, bitrate, and other media attributes would all happen during the analysis phase. The full XML for one of the items that isn’t sorted correctly might offer some more insight into what’s happening (which can be found via ‘View XML’ in the Get Info dialog).

I noticed that and took a glace at one. I’m not much of a code person so I couldn’t glem much from it.

What should I look for, and wouldn’t I have to edit the file directly?

You can’t edit the XML, but it lets you know exactly what information Plex knows about the file. Everything between (and including) <Media ...> ... </Media> would be where to look. For the duration specifically, search for duration=". Are any of those values different? Even if they’re the same, the fact that Plex wasn’t able to determine the bitrate after analyzing the file is a good indicator that there’s something about the file that Plex doesn’t like/can’t process.

As different as a guy who doesn’t know what he’s looking at does. :joy:

I might try to remove those films and re-rip them…

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