Thank you for this reply.
You'll find the Readme and AlbumPilot.php in
https://github.com/HendrikSchoettle/AlbumPilot/issues/30#issue-5712491763
I'd be happy if ypu would include it into your plugin 🙂
Regarding your questions:
- Which Piwigo, PHP and database versions you tested with, on Linux and Windows.
=> piwigo 16.4.0 with PHP 8.4.25, just on linux:
PHP 8.4.25 (cli) (built: Aug 28 2026 07:36:03) (NTS)
Copyright (c) The PHP Group
Built by Debian
Zend Engine v4.4.25, Copyright (c) Zend Technologies
with Zend OPcache v8.4.25, Copyright (c), by Zend Technologies
- A short description of what the direct SQL changes for the video aspect ratios do, since anything touching the database needs to stay consistent with Piwigo and the VideoJS plugin.
1) you can give an album-id or an album name for import. In case of album name we:
SELECT `id` FROM `piwigo_categories` WHERE `name` = '$album_name' AND `id_uppercat` = " . $parent_id . " AND `site_id` = 1 LIMIT 1"
if we don't find the album we create it with "method=pwg.categories.add&name=" . urlencode($album_name) . "&pwg_token=" . $pwg_token;
Details you can find in function piwigo_get_or_create_album_id
2) add dimensions for videos:
SELECT img.id, img.path FROM piwigo_images - several joins WHERE several filter to get the ids of videos without dimensions
UPDATE piwigo_images SET width = $w, height = $h WHERE id = $row['id'] with the dimensions of the video preview pictures
Details you can find in function piwigo_repair_video_dimensions
- Your confirmation that you are fine with your code being published under the same terms as AlbumPilot (MIT / LGPL-2.1-or-later / GPL-2.0-or-later).
Yes, for sure you can
Br
Matthias