Bug: Inconsistent sort order between files and folders

Infuse treats name sorting differently for files and folders when selecting Settings > Sort Order > “Title”.

For example, consider a file called “The Bat” and a folder called “The Bat”.

When Infuse is set to sort by Title, in a folder of files, it will correctly sort “The Bat” (file) alphabetically under “B”, ignoring the initial “The”.

But in a folder of folders, it will still sort “The Bat” (folder) alphabetically under “T”. This is wrong.

So this setting doesn’t change the sort order for folders, but it should if it is to be consistent with the way filenames are sorted.

Thanks.

I’m not sure this is technically wrong as videos have both a file name and a fetched title whereas folders just have the folder name.

A way to workaround this would be to switch the Sort By option to Filename in Infuse > Settings. This will give you a mixed sorting view that will sort everting by the file/folder name.

I tried this, but folders called “The [name]” are listed alphabetically under “T”, not the initial letter of [name], regardless of the sort order selected in Infuses settings.

@james - I think this can be called a bug, or at least an oversight, simply because sorting by Filename or Title is not done the same way between files and folders.

My files are mostly raw MPEG 2 files that contain no Title metadata. Hence the only attribute Infuse can use for sorting is the disk filename.

If in Infuse Settings the sort order is set to “Title” then even though these files contain no metadata or Title, they are alphabetically sorted by filename ignoring any initial ”The”. I consider that to be the appropriate and correct behaviour, and has clearly been coded in Infuse somewhere for it to behave that way.

Changing the sort order to “Filename” however results in these same files being strictly sorted alphabetically, so files beginning with “The” are sorted under “T”.

But for folders, this behaviour is different. Folders are always sorted strictly alphabetically, regardless of whether the sort order is set to “Filename” or “Title”.

So saying this different behavioiur is OK because Folders don’t have a Title doesn’t wash, because Files without a Title are not treated the same way.

Try it yourself and you will see that what I describe is right.

Surely it cannot be difficult to fix this so that Folders and Files are sorted the same way (ignoring any initial “The” in the file or folder name) when the sort order is “Title”, even when there is no Title metadata associated with either.

Thank you.

@james , Why does “Sort by Filename” sort by the names of movies’ containing folders (as opposed to the actual filename) but actually sort by TV episode filenames (and not TV series containing folder names)?

Eample:

Folder Name =
Bourne 5 - Jason Bourne (2016)
Filename =
Jason Bourne (2016) ‘’Bourne 5’’ 4K HDR 25gb.mkv

If sort by Filename actually sorted by movie filename, the title would be listed in the Js (same as if I sorted by Title) … but it isn’t — it’s sorted in the Bs (just as I want!).

TV series don’t do this.

Example:

Folder Name =
Expanse ,The (2015) 4K HDR 627gb
Filenames =
Season 1/The Expanse (2015) S01E01 4K - Dulcinea (2015).mkv
Season 6/The Expanse (2015) S06E06 4K - Babylon's Ashes (2022)

If TV series were actually sorted by containing folder name as movies are, sorting by Filename ought to show this series in the Es alphabetically — not in the the Ts with every other show beginning with “The” — (as a high percentage of them do!)

Instead, to get the desired result, I need to sort by Title. This, like it does for movies, properly disregards leading articles for titles beginning with “The” (but oddly not “A” or foreign equivalents).

Yet I’ve already mentioned why sorting by FOLDERname for movies (as it actually does) is preferred (due to limitations of TMDB’s api).

Can you not do the same for TV series? Sort by FOLDERname just makes more sense.

Users organize their titles in folders; and they organize their folders in a way that is pleasing to them. This is the organization we really want. Filenames are irrelevant — especially considering the strictness required for TMDB searches based on them.

Thanks!

Additional examples in this thread.

There is some complicated handling for TV show series/folder flattening, so this may not always match up with you see for movies. This is done to provide the nice series/season organization you see in Infuse, even while browsing outside of the library.

To get these to appear under E, you can try renaming the episodes to ‘Expanse 2015 S01E01’ as that should give you the same automatic matches since that is the top result on TMDB. expanse — The Movie Database (TMDB)

1 Like

Thanks for the reply. I’ll give it another shot — I’m certain I must have tried that at some point and had difficulty with the scraping, but perhaps that’s better now. Will update on success.

Happy New Year, Firecore!

Houston, we have a problem.

Obviously, a major malfunction.

Gaaah!!!

I’ve gone and deleted leading articles from the filenames of over 10,000 TV episode videos and metadata files (having to rewrite all my scripts to accomplish this now and in the future).

I had to create alternate titles for several series at TMDB where searching failed without the leading articles: “The First (2018)” becomes “First Hulu (2018)”, “The Hunt (2015)” becomes “Hunt BBC (2015)” … similarly needed to create “Responder BBC (2022)”, “Teacher Hulu (2020)”, “War of the Worlds BBC (2019)”, “Wire HBO (2002)”.

(As typical with TMDB, most failed matches included titles with very short one word titles; usually being hijacked by series with longer titles including that word. BBC’s 2019 “The War of the Worlds” failed because it understandably conflicts with Studio Canal’s 2019 “War of the Worlds”.)

After disconnecting from iTunes, deselecting my shares, deleting my Infuse database, restarting my AppleTV, and reimporting … I first thought everything was okay when I viewed my collection in the files browser. My alternate titles worked to correctly identify all the troublesome series, and all were presented in proper filename order.

SO - CONSIDER MY SURPRISE

When I went to the library and clicked the pink icon for “TV Shows” and all my titles were sorted alphabetically by leading article!!

“The Expanse”, which you promised would be sorted under E, is STILL sorted under T. So is “The First”. As is every other title beginning with “The …”.

Every title beginning with “A … ” is sorted under A. As is every title beginning with the articles An, El, Das, La, & Les (which have similarly been stripped from filenames).

What. The. F—-.

How? No filename, nor containing folder, begins with T.

Exhibits 1-3:



Bizarrely, “Sort by Title” at least disregards the leading article “The” — though not “A” and “An” (“A Perfect Planet” and “A Teacher” still listed with As) nor the foreign equivalents mentioned above.

How in tarnation does “Sort by Filename” result in titles being sorted by leading articles when neither the folders NOR the actual filenames include the leading articles?

@James, is this ^(above post) something you can quickly check for me on your own system?

I spent my whole New Year’s weekend updating my collection to fix the sorting issue per your suggestion and … well, I’m pretty frustrated “Sort by Filename” is working even wonkier than “Sort by Title”. :confused:

James … you’ve still never explained why you pointlessly had me rename all my files when Infuse disregards filenames altogether and sorts by TMDB title regardless (not ignoring leading “The”s as Infuse does when sorting by title), nor acknowledged my having pointed out that Infuse does the same with TMDB collections.

Are you planning to fix this?