Jellyfin Forum
Sorting by filename - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: General Questions (https://forum.jellyfin.org/f-general-questions)
+--- Thread: Sorting by filename (/t-sorting-by-filename)



Sorting by filename - hvb81479 - 2025-04-16

Hi everybody,

I try to solve the following use case:
  • a "history" folder contains videos on - guess what - historical events
  • The videos are a mix of films, documentaries, news clippings etc, i.e. a wild representation of things
  • Index-pointing-up a key feature of this folder is the chronological order of these videos (as this helps to put the events in the historical context easily)
  • to achieve this that each video starts with a iso-date string, e.g. 20010911-9-11-inside-the-president-s-war-room   
  • Index-pointing-up keeping this file name logic is a prerequisite 
  • given the nature of the folder not all videos have metadata provided by tmdb.org so
  • however, it would be nice of course if Jellyfin grabs the metadata for those videos where available
  • this works all right just by adding [tmdbid-848981] to the end of the file name
  • unwantedly, now both the chronological order and the display of the filenames are lost (of course)
  • Index-pointing-up showing the filename on the Jellyfin pages (instead of the correct file name) and sorting the videos accordingly are also prerequisites
  • for that reason https://forum.jellyfin.org/t-use-file-name-for-sorting?highlight=sort does not solve the use case
  • additionally, the solution has to be has to be fully automatized without any manual work needed

How can this use case been realized in Jellyfin, i.e. 
  • keeping the structure of the filename (iso-date string - filename - tmdbid)
  • displaying and sorting the videos by the filenames
  • and still grabbing the metadata

If this use case cannot be resolved with the already existing functionalities - would be great if feasible and thank you for advising - a new feature would be great: a checkbox "always use filename for sorting and display" (and override metadata). This option should be available per library

Thank you for getting your head into this and looking forward
Hans


RE: Sorting by filename - TheDreadPirate - 2025-04-16

Have you tried a Music Video library? It is, essentially, a folder/file view and should display folder/file names or embedded titles in the file, depending on the library settings. Since the names listed are the file names, any "name" sorting would be sorting by file name.


RE: Sorting by filename - hvb81479 - 2025-04-16

Hi,
thank you for getting into this.

yes, you are right. Listing is by custom file names. So far so good.
However, now the tmdbid's are ignored so that no metadata is pulled.

How can I keep the listing by filename but videos enriched by metadata via the tmdbid?


RE: Sorting by filename - TheDreadPirate - 2025-04-16

This is a tough one.

You could try putting it back into a shows/movies/mixed library and enable NFO saver and save images with your media. That will write the metadata to files that the music video library could then read.

But you cannot have the same folder in two libraries so you would have to add it to a library that pulls TMDB metadata, then move it back to the Music Videos library once it is done writing metadata to disk.


RE: Sorting by filename - hvb81479 - 2025-04-19

Hi,
I like your creativity to get to the solution :-) Thank you for this.
Is this here a good place to trigger new features or where would you point me to to raise a new feature request?


RE: Sorting by filename - TheDreadPirate - 2025-04-20

We have a feature request page.

https://features.jellyfin.org/

Please search for an existing feature request that matches yours. Submit a new request if one doesn't already exist.


RE: Sorting by filename - hvb81479 - 2025-05-13

@TheDreadPilot,
thanks for helping. I'll have a look.


RE: Sorting by filename - polemarks - 2025-05-19

(2025-05-13, 08:46 PM)hvb81479 Wrote: @TheDreadPilot,
thanks for helping. I'll have a look.


Hi hvb,

Can you let me know if you submit a request or found one? I looked through the tracker and haven't seen anything that matches exactly what we are looking for.

I just ran into this issue too, and since I don't have time yet to re-organize a TV show, this solution (Music Video) works ... for the most part:

(episode 001 and 002 are merged, which caused it to be at the end of the list)

   

Thank you,