Fixed Album thumbnail rebuild doesn't include custom media thumbnails

ChrisTERiS

Well-known member
You can’t add a custom thumbnail for albums, but you can for the individual media items.

There will be an automatically generated album thumbnail based on the thumbnails of the media items.

At last !!! Even well hidden, it exists and works fine for album's video. It also appears fine as cover in video player.

1634653586329.webp

The problem is that the photo mosaic does not appears in the album. The fact that the album is inside a category and not in my albums, makes any sense? Have cleared cache many time, I also rebuild XFMG: Rebuild album thumbnails but nothing good happen.

1634653908543.webp
 
@ChrisTERiS - a workaround as promised.

Edit the file src/addons/XFMG/Service/Album/ThumbnailGenerator.php and locate:

PHP:
$abstractedPath = $mediaItem->getAbstractedThumbnailPath();

Delete that line and replace it with:

PHP:
if ($mediaItem->custom_thumbnail_date)
{
   $abstractedPath = $mediaItem->getAbstractedCustomThumbnailPath();
}
else
{
   $abstractedPath = $mediaItem->getAbstractedThumbnailPath();
}

I suspect that should sort it but I haven't tested it :) Please let us know how you get on.
 
Unfortunately, still does not shows anything as album cover. Except XFMG: Rebuild album thumbnails I executed all XFMG rebuilds, cleared cache, I even added a new video as a way to activate the cover with new content, but still this is what I see:

1634712925031.webp
 
New Feedback:
If I add an Embed video then the Album gets a cover, including in the mosaic cover photos of videos that I uploaded.
But if the album has only uploaded videos, then it does not has any cover.
 
Unfortunately, still does not shows anything as album cover. Except XFMG: Rebuild album thumbnails I executed all XFMG rebuilds, cleared cache, I even added a new video as a way to activate the cover with new content, but still this is what I see:

View attachment 258869
Are you saying you didn't run the XFMG: Rebuild album thumbnails rebuild? That is the exact one you do need to run to hit the code added. FWIW I have had a chance to test this locally now and custom thumbnails are included within the album thumbnail mosaic.

If you did run that and you still don't get the album thumbnail showing then I wonder if the suggested code was applied correctly.

You do not need FFmpeg enabled if you're going to upload your own custom thumbnails.
 
Are you saying you didn't run the XFMG: Rebuild album thumbnails rebuild?
Uffff........ my bad English 🤨 I missed an "also". "Except XFMG: Rebuild album thumbnails I ALSO executed all XFMG rebuilds".
First I executed XFMG: Rebuild album thumbnails and when I seen that is not working, then I started running one by one all XFMG rebuilds.

To summarize the issue.

I replaced line 179
PHP:
$abstractedPath = $mediaItem->getAbstractedThumbnailPath();

with

PHP:
if ($mediaItem->custom_thumbnail_date)
{
   $abstractedPath = $mediaItem->getAbstractedCustomThumbnailPath();
}
else
{
   $abstractedPath = $mediaItem->getAbstractedThumbnailPath();
}

I even left empty line above and below as it was the original code. To be honest, I wonder if I also need to remove the code below
PHP:
if (!$abstractedPath)
{
    continue;
}
but when I seen that the new code has also the variable $abstractedPath I left it as is.

The result: If the video has only uploaded files, nothing appears as album thumbnail. If I add an Embed video in the album then album cover appears fine. And as I wrote before, the mosaic also contains photos from uploaded videos.
 
Fixed another issue you may have been running into so please let us know whether things improve once XFMG 2.2.4 is released.
 
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.4).

Change log:
When an album contains media with custom thumbnails ensure the album thumbnail is rebuilt as expected.
There may be a delay before changes are rolled out to the XenForo Community.
 
Top Bottom