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:
@@ -34,6 +34,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
- A feed whose website names an icon that is missing shows the site's `/favicon.ico` instead of
|
- A feed whose website names an icon that is missing shows the site's `/favicon.ico` instead of
|
||||||
no artwork.
|
no artwork.
|
||||||
|
- A website's icon standing in for a feed's artwork follows the site when it changes, and a
|
||||||
|
feed that drops its own artwork gets the site's instead. Refreshing a feed checks again.
|
||||||
- The read button shows whether an item is read, as the pin beside it shows whether it is
|
- The read button shows whether an item is read, as the pin beside it shows whether it is
|
||||||
pinned: a tick when read, an envelope when not. It used to show the opposite.
|
pinned: a tick when read, an envelope when not. It used to show the opposite.
|
||||||
- In Directory and Popular, Subscribe is a plus again, not the tick that marks a feed you have.
|
- In Directory and Popular, Subscribe is a plus again, not the tick that marks a feed you have.
|
||||||
|
|||||||
@@ -1214,9 +1214,12 @@ async fn scan_one(
|
|||||||
}
|
}
|
||||||
|
|
||||||
let mut parsed = feed::parse(&bytes)?;
|
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
|
// Looked for again whenever the feed is read in full, which is when it has changed or
|
||||||
// no icon is not asked again on every scan, nor the feed refetched in full for it above.
|
// someone asked for a refresh, so an icon the site changes or fixes follows it (#80). A miss
|
||||||
if parsed.image.is_none() && stored.image.is_none() {
|
// 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 {
|
parsed.image = Some(match &parsed.site {
|
||||||
Some(site) => feed::site_icon(&ctx.client, site).await.unwrap_or_default(),
|
Some(site) => feed::site_icon(&ctx.client, site).await.unwrap_or_default(),
|
||||||
None => String::new(),
|
None => String::new(),
|
||||||
|
|||||||
Reference in New Issue
Block a user