Hello,
Check out this new script. It creates the pwg_representative folder, converts .mp4 to .jpg and moves it to pwg_representative.
https://github.com/rogue07/piwigo_pwg_representative
Enjoy,
Ram
Piwigo 2.10.2
Operating system: Linux
PHP: 7.4.3 (Show info) [2020-07-03 19:50:46]
MySQL: 5.5.5-10.3.22-MariaDB-1ubuntu1 [2020-07-03 19:50:46]
Graphics Library: External ImageMagick 6.9.10-23
Last edited by BallPython (2020-07-05 04:43:56)
Offline
Copying the convert2jpg.sh script to each subdirectory to run it there is an odd approach. Rather invoke it with appropriate arguments so copying is not needed.
Also, both scripts could benefit from error handling so they don't continue to run if something goes wrong.
Important, at the end of convert2jpg.sh the
chmod 700 -Rf $DIR
chown -Rf www-data:www-data $DIR
may be correct for your hosting setup, but not for others and even may do harm in that it leaves files inaccessible to the web server if it doesn't run as the owner user, or even inaccessible to the owner if that is allowed to change ownership but is not www-data (though most systems don't allow that nowadays).
Offline
Thanks for the comments. This is only a start.
Offline