mirror of
https://github.com/hoernschen/dendrite.git
synced 2024-12-26 15:08:28 +00:00
🏗️ mediaapi/thumbnailer: fix build with bimg (#2440)
Co-authored-by: kegsay <kegan@matrix.org>
This commit is contained in:
parent
6b3c183396
commit
1b3fa9689c
1 changed files with 4 additions and 4 deletions
|
@ -37,7 +37,7 @@ func GenerateThumbnails(
|
||||||
mediaMetadata *types.MediaMetadata,
|
mediaMetadata *types.MediaMetadata,
|
||||||
activeThumbnailGeneration *types.ActiveThumbnailGeneration,
|
activeThumbnailGeneration *types.ActiveThumbnailGeneration,
|
||||||
maxThumbnailGenerators int,
|
maxThumbnailGenerators int,
|
||||||
db *storage.Database,
|
db storage.Database,
|
||||||
logger *log.Entry,
|
logger *log.Entry,
|
||||||
) (busy bool, errorReturn error) {
|
) (busy bool, errorReturn error) {
|
||||||
buffer, err := bimg.Read(string(src))
|
buffer, err := bimg.Read(string(src))
|
||||||
|
@ -49,7 +49,7 @@ func GenerateThumbnails(
|
||||||
for _, config := range configs {
|
for _, config := range configs {
|
||||||
// Note: createThumbnail does locking based on activeThumbnailGeneration
|
// Note: createThumbnail does locking based on activeThumbnailGeneration
|
||||||
busy, err = createThumbnail(
|
busy, err = createThumbnail(
|
||||||
ctx, src, img, config, mediaMetadata, activeThumbnailGeneration,
|
ctx, src, img, types.ThumbnailSize(config), mediaMetadata, activeThumbnailGeneration,
|
||||||
maxThumbnailGenerators, db, logger,
|
maxThumbnailGenerators, db, logger,
|
||||||
)
|
)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -71,7 +71,7 @@ func GenerateThumbnail(
|
||||||
mediaMetadata *types.MediaMetadata,
|
mediaMetadata *types.MediaMetadata,
|
||||||
activeThumbnailGeneration *types.ActiveThumbnailGeneration,
|
activeThumbnailGeneration *types.ActiveThumbnailGeneration,
|
||||||
maxThumbnailGenerators int,
|
maxThumbnailGenerators int,
|
||||||
db *storage.Database,
|
db storage.Database,
|
||||||
logger *log.Entry,
|
logger *log.Entry,
|
||||||
) (busy bool, errorReturn error) {
|
) (busy bool, errorReturn error) {
|
||||||
buffer, err := bimg.Read(string(src))
|
buffer, err := bimg.Read(string(src))
|
||||||
|
@ -109,7 +109,7 @@ func createThumbnail(
|
||||||
mediaMetadata *types.MediaMetadata,
|
mediaMetadata *types.MediaMetadata,
|
||||||
activeThumbnailGeneration *types.ActiveThumbnailGeneration,
|
activeThumbnailGeneration *types.ActiveThumbnailGeneration,
|
||||||
maxThumbnailGenerators int,
|
maxThumbnailGenerators int,
|
||||||
db *storage.Database,
|
db storage.Database,
|
||||||
logger *log.Entry,
|
logger *log.Entry,
|
||||||
) (busy bool, errorReturn error) {
|
) (busy bool, errorReturn error) {
|
||||||
logger = logger.WithFields(log.Fields{
|
logger = logger.WithFields(log.Fields{
|
||||||
|
|
Loading…
Reference in a new issue