Fixed Changing behaviour of album thumbnail generation requires overwriting whole method

Kirby

Well-known member
Affected version
2.2.2
Method XFMG\Service\Album\ThumbnailGenerator::createAlbumThumbnail() does configure a finder with somewhat hardcoded conditions and sorting:
PHP:
$media = $this->finder('XFMG:MediaItem')
    ->where('album_id', $album->album_id)
    ->where('thumbnail_date', '>', 0)
    ->where('media_state', 'visible')
    ->orderByDate()
    ->fetch(4);

I we want to change this behaviour (for example the ordering) it seems to be necessary to overwrite the whole method, effectively duplicating a lot of code.

If this could be moved to its own method (maybe in ]XFMG\Repository\Album?) it would be a lot easier to customize this.
 
Last edited by a moderator:
Thank you for reporting this issue, it has now been resolved. We are aiming to include any changes that have been made in a future XFMG release (2.2.3).

Change log:
Add a new method that can be used to find media items for album thumbnail generation.
There may be a delay before changes are rolled out to the XenForo Community.
 
Back
Top Bottom