A site icon is looked up again when the feed is read in full (#80)

The icon standing in for a feed's missing artwork was looked up once and
kept, so a site that changed or fixed its icon, or a feed that dropped
its own artwork, kept whatever was found first. A dead icon stored
before #79 would have stayed dead. It is now looked up whenever the
feed is read in full: when it has changed, or on a refresh someone asks
for, which reads in full since #77.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-09-29 12:51:19 +00:00
parent 95a8633877
commit 469467bf04
2 changed files with 8 additions and 3 deletions

View File

@@ -1214,9 +1214,12 @@ async fn scan_one(
}
let mut parsed = feed::parse(&bytes)?;
// Looked for once. A miss is stored as "", which the page draws as no art, so a site with
// no icon is not asked again on every scan, nor the feed refetched in full for it above.
if parsed.image.is_none() && stored.image.is_none() {
// Looked for again whenever the feed is read in full, which is when it has changed or
// someone asked for a refresh, so an icon the site changes or fixes follows it (#80). A miss
// is stored as "", which the page draws as no art, and which stops the refetch above.
// ponytail: a feed without validators is read in full every scan and asks its site each
// time too; keep a checked-at time per feed if that shows up in anyone's logs.
if parsed.image.is_none() {
parsed.image = Some(match &parsed.site {
Some(site) => feed::site_icon(&ctx.client, site).await.unwrap_or_default(),
None => String::new(),