ZenphotoCMS Forum
bug fix: videos only dyn. albums thumb error - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: General support (https://forum.zenphoto.org/forum-4.html)
+--- Thread: bug fix: videos only dyn. albums thumb error (/thread-6529.html)



bug fix: videos only dyn. albums thumb error - breglis - 2010-01-31

hi,
I have discovered a bug in the creation of Thumbnails in dyn. Albums that only
contain video. the function getAlbumThumbImage() in class-album.php does not
check for the existence of video-thumbs..
i.e. the files with identical name sitting next to the flv file

well once again I would like to offer something back to this great piece of software !

adding this to line 713 in class-album.php will fix the issue:


if (is_valid_image(substr($thumb['filename'],0,-4).".jpg")) {
$alb = new Album($this->gallery, $thumb['folder']);
$thumb = newImage($alb, substr($thumb['filename'],0,-4).".jpg");
if ($thumb->getShow()) {
$this->albumthumbnail = $thumb;
return $thumb;
}
}


I suggest that this or some more glamorous solution goes into the next release




bug fix: videos only dyn. albums thumb error - sbillard - 2010-01-31

Thanks for the alert. The final solution will have to be "more glamorous" as at least there are other formats than JPEG that could be thumbnail standins.