0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-09-28 19:58:53 +02:00

modules/media/thumbnail: Get magick availability this way for now.

This commit is contained in:
Jason Volk 2019-06-04 02:22:09 -07:00
parent 06e7d94aef
commit 8a69adb9c5

View file

@ -236,13 +236,24 @@ get__thumbnail_local(client &client,
copied
};
static const bool available
{
mods::loaded("media_magick")
};
const bool fallback // Reasons to just send the original image
{
// Disabled by configuration
!enable ||
!dimension.first ||
!dimension.second ||
(method != "scale" && method != "crop")
//TODO: condition if magick is actually loaded
// Unknown thumbnailing method in query string
(method != "scale" && method != "crop") ||
// No dimension parameters given in query string
(!dimension.first || !dimension.second) ||
// The thumbnailer is not loaded or available on this system.
!available
};
if(fallback)