Move old items' http artwork to https too, for hosts the feed no longer names (#110)
The first pass only asked the hosts the feed's current body names. IGN's feed kept five 2009 items with artwork on assets1/assets2.ignimgs.com, which its feed no longer mentions, so they stayed on http. A scan now also asks, once per host, the hosts of the feed's stored http artwork (Db::http_images). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1430,7 +1430,11 @@ async fn scan_one(
|
||||
if let Some(art) = &parsed.image {
|
||||
parsed.image = Some(feed::prefer_https(&ctx.client, art, &mut secure).await);
|
||||
}
|
||||
// Items stored before, which a scan does not write again, move with their host.
|
||||
// Items stored before, which a scan does not write again, move with their host, and a host
|
||||
// only they still name is asked too.
|
||||
for art in ctx.db.http_images(id).await? {
|
||||
feed::prefer_https(&ctx.client, &art, &mut secure).await;
|
||||
}
|
||||
for (host, ok) in &secure {
|
||||
if *ok {
|
||||
ctx.db.secure_images(id, host).await?;
|
||||
|
||||
Reference in New Issue
Block a user