Skip to content

Commit

Permalink
fix: feed icon loaded from feed URL instead of site URL
Browse files Browse the repository at this point in the history
  • Loading branch information
gabe565 committed Nov 22, 2024
1 parent c6c71c5 commit b35250d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions internal/reader/icon/checker.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,32 +34,32 @@ func (c *IconChecker) fetchAndStoreIcon() {
requestBuilder.IgnoreTLSErrors(c.feed.AllowSelfSignedCertificates)
requestBuilder.DisableHTTP2(c.feed.DisableHTTP2)

iconFinder := NewIconFinder(requestBuilder, c.feed.FeedURL, c.feed.IconURL)
iconFinder := NewIconFinder(requestBuilder, c.feed.SiteURL, c.feed.IconURL)
if icon, err := iconFinder.FindIcon(); err != nil {
slog.Debug("Unable to find feed icon",
slog.Int64("feed_id", c.feed.ID),
slog.String("website_url", c.feed.FeedURL),
slog.String("website_url", c.feed.SiteURL),
slog.String("feed_icon_url", c.feed.IconURL),
slog.Any("error", err),
)
} else if icon == nil {
slog.Debug("No icon found",
slog.Int64("feed_id", c.feed.ID),
slog.String("website_url", c.feed.FeedURL),
slog.String("website_url", c.feed.SiteURL),
slog.String("feed_icon_url", c.feed.IconURL),
)
} else {
if err := c.store.StoreFeedIcon(c.feed.ID, icon); err != nil {
slog.Error("Unable to store feed icon",
slog.Int64("feed_id", c.feed.ID),
slog.String("website_url", c.feed.FeedURL),
slog.String("website_url", c.feed.SiteURL),
slog.String("feed_icon_url", c.feed.IconURL),
slog.Any("error", err),
)
} else {
slog.Debug("Feed icon stored",
slog.Int64("feed_id", c.feed.ID),
slog.String("website_url", c.feed.FeedURL),
slog.String("website_url", c.feed.SiteURL),
slog.String("feed_icon_url", c.feed.IconURL),
slog.Int64("icon_id", icon.ID),
slog.String("icon_hash", icon.Hash),
Expand Down

0 comments on commit b35250d

Please sign in to comment.