paolobenve / myphotoshare

MOVED TO GITLAB! --- A Web 2.0 Photo Gallery Done Right via Static JSON, Dynamic Javascript and a bit of php for sharing
15 stars 0 forks source link

Multiple roots support #74

Closed pmetras closed 6 years ago

pmetras commented 6 years ago

Do we want to support multiple album roots?

I explain the user case by a scenario. I have children and they take photos too. We put all our photos in the following directory structure:

-albums
     +----- Dad
             +----- Dad_album1
             +----- Dad_album2
             etc.
     +----- Child1
             +----- Child1_album1
             +----- Child1_album2
             etc.
     +----- Child2
             +----- Child2_album1
             +----- Child2_album2
             etc.

Obviously, when a child wants to see her pictures, she goes into her root album and browse the sub-albums. But she can't use the alternate views by date or GPS location because these views are global to the whole albums content.

The current way of dealing with this situation is to have 3 myphotoshare.conf files, one for Dad, one for Child1 and one for Child2. But it means managing 3 configuration files...

What if album_path or index_html_path directive in myphotoshare.conf can list multiple directories? Or better if we have a setting to say that first level directories have to be seen as root folders?

I don't know the complexity of implementing such feature. Is it worth the effort?

paolobenve commented 6 years ago

The scanner should be instructed to treat the 1st level directories as root albums: the treewalker would be run with every 1st level directory.

Each 1st level directory should use its own cache, so /cache/ would become /cache/Dad/ for /Dad, etc.

JS searches the option file in /cache, in case it doesn't find it in /cache it would look for it in /cache/ subdirs, presenting say the 1st level directories subalbum, and after entering in a 1st level subalbum things should be organized so that the 1st level subalbum is the root dir...

It seems feasible, but quite complex...