Only show relevant folder paths in manual mode

I am self-organizing my pictures folder (“don’t touch my stuff”-mode) and have added it as a “manual” source. The mount point is a bit awkward (long) “/var/raid/data/family/photos/”.

Expected Behavior

When I click “view by folder” PS presents the folders of the source folder (so subfolders in “photos/”) and does not show parent directories (such as /var, /var/raid, /var/raid/data, …)

Current Behavior

It starts at the root (fs / var) and makes me click through single folders until I arrive at my photo source path:

  • fs / var :computer_mouse:
  • fs / var / raid :computer_mouse:
  • fs / var / raid / data

:star: :star: :star: :star: :star: use of mouse emoji to show the pain and suffering of those long paths.

I hear you: I’ve got long paths in my library as well.

So: I was going to mount the filesystem tags by scanPath directories, but if you add a parent directory for a new scanPath, that wedges up the works, and I wanted to get the alpha out the door, so I left the issue for Future Me to solve.

So: what would be a good way to solve this? Unfortunately, tag paths are relatively “burned in” to assets via the AssetTag database table, in that re-parenting tags is a PITA.

So: what’s the nice way to fix this?

  1. I add a setting that holds a list of directories that are sub-paths to be elided from all filesystem tags (so you’d put /var/raid/data into this setting). I could be “clever” and add a bunch of common, useless sub-paths as a default (like /var, /home, …)

  2. Some better idea you come up with

So, so :thinking:

I could be “clever” and add a bunch of common, useless sub-paths as a default (like /var, /home, …)

Also quoting you: “horrible whack-a-mole game” :hammer: (scnr :wink:)

Some better idea you come up with

I have no idea how “View by Folders” does its parsing, but from a look at the db you have parentId and assetCount in there for every item in the Tag table. Make a rule in the front-end that hides a folder (-tag) if assetCount is the same as in the parentId?

So in my case:

select * from Tag where _path LIKE "fs%" LIMIT 3;

623|   |fs       |3|1615801652591|1615878748658|**15075**|**16722**|Folder||
627|623|fsvar    | |1615801667256|1615801667256|**15075**|**16722**|      ||
628|627|fsvarraid| |1615801667259|1615801667259|**15075**|**16722**|      ||

would exclude ids 623 & 627 since the assetCount (or assetFileCount) is the same as in 628.

Not sure if this creates more issues than it solves, though.

1 Like

Totally agree… this seems a path to terrible things to me…

This seems a clever solution! I think you would have to have some other rule to see if the path is a subpath of the other AND has the same assetCount - otherwise I believe you could accidentaly hide a path that just happened to both have the same number of assets (maybe I’m reading it wrong).

1 Like

Exactly! Since these tags assume inheritance the parentId should always be the top level folder and thus work as planned.

But this definitely a folder-specific solution…if applied to other tags, e.g., “Where/France/Paris/Louvre” when there’s only photos of the Louvre this would kill your ability to browse “France”…

1 Like

Actually, I think your collapse-empty-folders idea would be fine for this: as soon as there were other sibling tags that included assets, those wouldn’t collapse.

And by “collapsing”, I mean using the ... approach here:

1 Like