0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-25 23:14:13 +01:00

modules/media: Remove handles for dynamic magick module.

This commit is contained in:
Jason Volk 2020-08-24 01:40:46 -07:00
parent f5dd9debb6
commit e891f0baff
3 changed files with 1 additions and 40 deletions

View file

@ -10,14 +10,6 @@
#include "media.h"
struct ircd::m::media::magick
{
module modules
{
"magick"
};
};
ircd::mapi::header
IRCD_MODULE
{
@ -26,9 +18,6 @@ IRCD_MODULE
ircd::m::media::fini
};
decltype(ircd::m::media::magick_support)
ircd::m::media::magick_support;
decltype(ircd::m::media::log)
ircd::m::media::log
{
@ -192,24 +181,6 @@ ircd::m::media::init()
// the database was just loaded to set the cache size.
conf::reset("ircd.media.blocks.cache.size");
conf::reset("ircd.media.blocks.cache_comp.size");
// conditions to load the magick.so module
const bool enable_magick
{
// used by the thumbnailer
thumbnail::enable
// support is available
&& mods::available("magick")
};
if(enable_magick)
magick_support.reset(new media::magick{});
else
log::warning
{
log, "GraphicsMagick support is disabled or unavailable."
};
}
void

View file

@ -16,8 +16,6 @@ namespace ircd::m::media
static void fini();
extern log::log log;
extern std::unique_ptr<m::media::magick> magick_support;
extern conf::item<bool> blocks_cache_enable;
extern conf::item<bool> blocks_cache_comp_enable;
extern conf::item<size_t> blocks_cache_size;

View file

@ -267,11 +267,6 @@ get__thumbnail_local(client &client,
copied
};
const bool available
{
m::media::magick_support
};
const auto mime_type
{
split(content_type, ';').first
@ -303,14 +298,11 @@ get__thumbnail_local(client &client,
// Access denied for this operation
|| !permitted
// The thumbnailer is not loaded or available on this system.
|| !available
// Arguments invalid.
|| !valid_args
};
if(fallback && available && enable)
if(fallback && enable)
log::dwarning
{
"Not thumbnailing %s/%s [%s] '%s' bytes:%zu :%s",