Announcement

#1 2021-10-09 13:29:35

weingeist
Member
2021-10-08
2

Import existing file structure and organize in virtual albums

Hi all,

I am new to Piwigo, hoping that I finally solve my photo organization challenge. I have tried photo organization with Nextcloud and Plex (both excellent at what they do best), but non of them served all my needs in terms of photos.

I am running a TrueNAS core system (former FreeNAS, which is based on FreeBSD) for storing data and photos of members of my family, so everyone has his own photos folder. Piwigo is installed as a plugin in a FreeBSD jail (basically a lightweight virtual instance), where all the user's photo folders are mounted to /galleries/.

After synchronizing, I get a physical album structure according to the file structure of each user:
>galleries
--> user1
----> 2020
------> vacation1
------> event2
----> 2021
------> vacation3
--> user2
----> 2021
------> vacation3
etc


My goal is now reorganizing these physical albums into a new virtual album structure, effectively replacing the old structure, something like this:
> galleries
--> vacations
----> vacation 1
------> pics-user1.jpg
----> vacation 3
------> pics-user1.jpg
------> pics-user2.jpg
--> events
----> event 2
------> pics-user1.jpg
--> nature
------> pics-user2.jpg

So a few things to notice:
- I'd like to fully get rid of the physical structure (in Piwigo), I don't need annual albums anymore because Piwigo does this very nicely
- I'd like to merge user albums of the same event/vacation together.


Now, I am unsure about the best way to achieve this:
a) Manually: I saw that I could go to each physical sub-album, "manage album photos", then batch manage them using "associate to album" (or "move to album??"). Would be a ton of work, since we are talking about roughly 1000 albums (plus often additional sub-albums), that are organized in the currently existing annual folders.

b) Use a plugin like Virtualize and VirtualizeAlbumById, but it seems as both weren't maintained recently and 11.5.0 is not supported for those. Any reason for that? Not necessary anymore because it was built into native Piwigo? I didn't find it however.

c) Self coded? Since importing is a one time thing, some coded workaround would be acceptable, but I'd had no idea where to start.


If anyone had to do something similar, I'd love to hear your thoughts.

Thanks in advance,
Cheers
weingeist

Offline

 

#2 2021-10-09 17:56:37

erAck
Only trying to help
2015-09-06
1368

Re: Import existing file structure and organize in virtual albums

Years ago I used [extension by plg] Virtualize for that task and it worked fine. It's marked as still compatible with Piwigo 11 and by the Piwigo author, plg. And once virtualized you can also assign pictures to any virtual album(s).


Running Piwigo at https://erack.net/gallery/

Offline

 

#3 2021-10-11 21:15:24

weingeist
Member
2021-10-08
2

Re: Import existing file structure and organize in virtual albums

Thanks for your swift answer.

I had looked at it and was pretty sure 11 was not on the compatibility list, but there it is. Even better.

I tested it, and it works quite fast and well. For me there is just one (killer) issue. The virtualize process irreversibly MOVES all photos to /upload/. From a nicely structured physical organization to a big soup of files. So the organization survives exclusively in Piwigo. This would make it extremely painful if I'd ever want to switch to something else some-when in the future.

It would be perfect for me, if they would just be assigned to a virtual copy of the album. I tried with read-only permissions, but the virtualize script is not happy about it. Even standard Piwigo functions don't work, when the linked gallery-folders are read-only. Why is that? Error messages during trying to sync (simulation mode):

Warning: opendir(./galleries/user-gallery-1): failed to open dir: Permission denied in /usr/local/www/Piwigo/admin/include/functions.php on line 608

Warning: opendir(./galleries/user-gallery-1): failed to open dir: Permission denied in /usr/local/www/Piwigo/admin/site_reader_local.php on line 70

Offline

 

#4 2021-10-12 17:16:02

erAck
Only trying to help
2015-09-06
1368

Re: Import existing file structure and organize in virtual albums

virtualize process irreversibly MOVES all photos to /upload/.

Yes.

Even standard Piwigo functions don't work, when the linked gallery-folders are read-only.

Warning: opendir(./galleries/user-gallery-1): failed to open dir: Permission denied in /usr/local/www/Piwigo/admin/include/functions.php on line 608

I doubt that. That's the standard PHP opendir() function, which works perfectly well with read-only folders. If that fails with this message it means it can't read the directory content. Make sure you didn't remove the read permission for the user the web server runs as.


Running Piwigo at https://erack.net/gallery/

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2022 · Contact