Thanks for the suggestion. Something like "favorites" is definitely on the radar, and I was thinking of also including a highlighted "favorites" folder in the left menu that can display all favorites from all folders.
What we CAN do, is use browser localStorage to store all favorites (like a browser-based database). This is fast and effective, doesn't depend on login and doesn't depend on storing anything in database or on server. The disadvantage is that favorites will only be available from the device/browser where user added them. Still could be useful in many and perhaps even most usage cases.
A dedicated persistent option would be more challenging:
- We would need to store favorites in either database or JSON files on server.
- Favorites would require login, because we would need to attached stored favorites to a specific user.
Sure, altough this brings up another issue. Lychee and many similar gallery/management systems, run strictly from a database, which manages the virtual folder structure and all file names. For example, all uploaded images will exist in a predefined location (like /uploads/big/d250ea3871f5eae83f66adf2c1b45618.jpg
) directly tied in with the database. Structure and names are "virtual" as everything is controlled by the app and database. You can't just use existing folders and files names, unless you "import" first. The ADVANTAGE of this, is that the app controls everything, and "favorites" remain linked to the same entry in the database, regardless of changes to the virtual file system.
Files app on the other hand, for obvious benefits, simply reads existing file system and real file names without changing anything. If someone has favorited /folderA/bike.jpg
and someone moves or renames folderA
to folderB
, it's not possible for Files app to track these changes across all users favorites. Changes may of course be made directly on the file system, so it's impossible for Files app to keep track of this. It's not really a big problem, as unlinked favorites will simply get removed or become invalid.
My point is, it can definitely be done, but "favorites" in Files app simply can't be as waterproof as a gallery CMS that requires full control of the file system which is virtualized from database.