Persist failure to detect favicon average color.
Previously, an empty string returned by '\Colors\calculate_avg_color()' would be set as the 'favicon_avg_color' value, resulting in always reattempting average color calculation.
This commit is contained in:
parent
f0f7a5f958
commit
380624a484
|
@ -633,12 +633,14 @@ class RSSUtils {
|
|||
$feed_obj->save();
|
||||
|
||||
$feed_obj->favicon_avg_color = \Colors\calculate_avg_color($favicon_cache->get_full_path($feed));
|
||||
$feed_obj->save();
|
||||
if ($feed_obj->favicon_avg_color) {
|
||||
$feed_obj->save();
|
||||
}
|
||||
|
||||
Debug::log("favicon: avg color: {$feed_obj->favicon_avg_color}", Debug::LOG_VERBOSE);
|
||||
|
||||
} else if ($feed_obj->favicon_avg_color == 'fail') {
|
||||
Debug::log("floicon failed on $feed, not trying to recalculate avg color", Debug::LOG_VERBOSE);
|
||||
Debug::log("floicon failed on $feed or a suitable avg color couldn't be determined, not trying to recalculate avg color", Debug::LOG_VERBOSE);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue