Jump to content

Folders containing only one file are shown as file only -> problem with alphabetical sorting


JanKol

Recommended Posts

JanKol

Hello Emby community,

I have my movies library based on folder strucuture where each movie is in separate folder with same name as movie. In case movie has more parts, for example Shrek 1-3, in library root folder is folder Shrek and in this folder are subfolders Shrek 1 to Shrek 3, each subfolder contains single movie file. Mostly, there is lot of folders wih only one file inside.

 

I have found out that in case of single file folder, Emby shows only file (do not respect my folder hiearchy I insist on). As result, in folder view mode, folders with more files/subfolders are shown as first, sorted alpabeticaly, and then files from single file folders are shown, sorted alphabeticaly. If I switch to Sort by name, it is quite better, but still alphabetical sorting is sometime strange. Let me show my situation on pictures. Sorry for czech language in the my pictures.

 

This is original folder structure and order. (Screenshot from Total Commander)

5e88e8f74caae_01_Real_Folder_Structure.j

 

This is Emby library, when folder view is selected (as first folders with more files/subfolders are shown):

5e88e9a756eaa_03_Emby_View_By_Folder.jpg

 

 

 

This is Emby library, when folder view is selected (here is place where files from single file folders are being shown):

5e88ea46e5ec5_04_Emby_View_By_Folder_Las

 

And this is when Alphabetical view is selected:

5e88eab517b7c_02_Emby_View_By_Name.jpg

 

If you compare folder structure and last image with alphabetical view, there are some differencies. One most strange: There is folder "A Brilliant Young Mind", not shown in another pictures as for some reason, this movie is placed between movies "Borat" and "Bruno".

 

Is it possible to force Emby to respect folder hiearchy as it is, even there is only one file in some folder without any other files or folders? What am I doing wrong with sorting, why there is slighty different order of movies/files/folders when sorted alphabeticaly?

 

Now I am running beta version 4.5.0.2 (updade to latest version is comming soon but I think this will not solve my problem).

 

I have tried to check formum, but I did not find any similar enough topic.

 

Thank you for advices in advance.

 

JanKol

 

Link to comment
Share on other sites

Hi, yes i noticed this the other day when folder view is selected. The problem is, that's just the way we've always single video folders and it's kind of special sauce for our longtime users.

 

It's on my list for review. Thanks for reporting.

Link to comment
Share on other sites

Happy2Play

 

If you compare folder structure and last image with alphabetical view, there are some differencies. One most strange: There is folder "A Brilliant Young Mind", not shown in another pictures as for some reason, this movie is placed between movies "Borat" and "Bruno".

 

Emby is configured to remove specific sort words and A is one of them.  So in this example "A Brilliant Young Mind" is properly sorted to B.  If you don't want this you have to apply a Sort Title to the items metadata or manually change the system.xml.

 

snippet from system.xml

<SortRemoveWords>
    <string>the</string>
    <string>a</string>
    <string>an</string>
    <string>das</string>
    <string>der</string>
    <string>el</string>
    <string>la</string>
  </SortRemoveWords>
Edited by Happy2Play
Link to comment
Share on other sites

@@Happy2Play, this is actually because of the way that single video folders will swallow the folder and present just the video.

 

It's a tricky situation because it's a bit of special sauce that our long time users like, but it does impact the folder view and cause it to not really be a true folder view.

Link to comment
Share on other sites

pwhodges

Hmm.  When I select folder view, I get just folders, whether they contain one film or several, exactly as I'd expect.  Based on my experiences trying to get my music into a form that's compatible with Emby (still work in progress...), I wonder if the behaviour is different if there is even one single video file which is not in a folder.

 

Paul

Link to comment
Share on other sites

Happy2Play

This can be do to so settings flip flopping in previous versions a while also.

 

system.xml  <CollapseVideoFolders>true/false</CollapseVideoFolders>

library options.xml <CollapseSingleItemFolders>true/false</CollapseSingleItemFolders>

 

New install are both set to true.

New libraries are set to true.

 

These are library destructive settings, so manually changing will force remove and re-add the library.

Link to comment
Share on other sites

Hmm.  When I select folder view, I get just folders, whether they contain one film or several, exactly as I'd expect.  Based on my experiences trying to get my music into a form that's compatible with Emby (still work in progress...), I wonder if the behaviour is different if there is even one single video file which is not in a folder.

 

Paul

 

This is probably what we should do, it's just that whenever i try to move us in this direction we get enough complaints that we're forced to go back.

Link to comment
Share on other sites

JanKol

Hello all,

thank you all for your replies. If I understand correctly, single folder view is good feature for most Emby users, but there is way how to change it:

 

This can be do to so settings flip flopping in previous versions a while also.

 

system.xml  <CollapseVideoFolders>true/false</CollapseVideoFolders>

library options.xml <CollapseSingleItemFolders>true/false</CollapseSingleItemFolders>

 

New install are both set to true.

New libraries are set to true.

 

These are library destructive settings, so manually changing will force remove and re-add the library.

 

 

 

Thank you for this advice, I will try it. I would like to just double check correct procedure:

 

1. Go to ...\Roaming\Emby-Server\programdata\config\system.xml; change <CollapseVideoFolders>true</CollapseVideoFolders> to <CollapseVideoFolders>false</CollapseVideoFolders>

 

2. Go to ...\Roaming\Emby-Server\programdata\root\default\<Emby library name>\options.xml; change <CollapseSingleItemFolders>true</CollapseSingleItemFolders> to <CollapseSingleItemFolders>false</CollapseSingleItemFolders>

 

3. Restart Emby Server to let Emby know about manual changes in configuration files

 

3. Remove and re-add affected library? Would it be possible just to completely refresh metadata? (Replace all existing metadata + overwrite exisiting images)?

 

For video files what has, priority? CollapseVideoFolders or CollapseSingleItemFolders? What if I just changed CollapseSingleItemFolders in all libraries?

 

I will also do this:

 

 

Emby is configured to remove specific sort words and A is one of them.  So in this example "A Brilliant Young Mind" is properly sorted to B.  If you don't want this you have to apply a Sort Title to the items metadata or manually change the system.xml.

 

snippet from system.xml

<SortRemoveWords>
    <string>the</string>
    <string>a</string>
    <string>an</string>
    <string>das</string>
    <string>der</string>
    <string>el</string>
    <string>la</string>
  </SortRemoveWords>

Is it needed to refresh matadata aftrer <SortRemoveWords> update?

 

Thanks,

JanKol





 

 

Link to comment
Share on other sites

JanKol

Hi, I have tried all your suggestions on one of my library and it looks great. I have just one last small issue with sorting. See new order of movides and focus on "300" movie:

 

5e89b77ca8e03_05_Emby_View_By_Folder_Aft

 

Movies starting with letter "A" and all other movies sorting looks OK at first sight. I have just noticed problematic sorting of "300" movie being placed between "22 Vystrelu" and "2012". I have seen some similar tags to tag <SortRemoveWords>, but I have no idea how they are working. Do anybody know what to change to get "300" movie after "2012" movie?

 

Anyway, I am glad that Emby can act in way I want to. I based my library architecture on folder hiearchy and file and folder names. This way is most easier way for me and I do not need any user metadata which could be lost, so for me it is no problem to restore metadata anytime.

 

Link to comment
Share on other sites

By changing that config setting you will likely see quirks because we're not really testing it.

 

Ultimately we need to resolve this not through hidden config settings but by some other means that will just work.

  • Like 1
Link to comment
Share on other sites

  • 3 years later...
tomlepk@gmail.com

Correction:
I know this is an older thread.  I have that single item folder problem. I have a folder call 'Instructional' (mixed-content but is only instructional videos). I created a file called 'PlaceHolder.mp4' that is 0 bytes in that directory. that gives me the Folder icon. added that file to all single use folders*. Next scan the Library. Then I setup Block (per user in Parental Access) with tag called "TagPlaceHolder', used BulkyEditor to add tag to all instances of the 'PlaceHolder' file (just use Filter in the top folder add Search for String for 'PlaceHolder' to show all of them ( DON'T user the file extension '.mp4' in the filter). Check the list to be safe. Click first one, Shift-Click last one (selects all). Bulk Edit - choose 'Replace All' from drop-down - enter 'TagPlaceHolder' - Save.


*Wrote a python script to add that file to every folder in the sub directory tree (you could only add it to the single ones if you have only a few by hand - easier coding this way). Then scanned library. You will have to do this step again for any newly created directories and this is ONLY a generic workaround.

I added the python script I used and it was tested on Linux (Ubuntu) and Windows 10 - make a backup before - use at your own risk,

Hope that helps!

ADDITIONAL NOTE: Once you set the tag to 'Block' those files they will not show up in the Bulky Editor for that user either. Noticed this during testing. Just make sure you have a Admin User with out the Parental Block when updating or Don't add it to your Current Admin.

placeholder.py

  • Thanks 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...