fetch favicon
This commit is contained in:
parent
ac5fa62cf3
commit
fae9f490cc
7 changed files with 136 additions and 22 deletions
|
|
@ -53,6 +53,15 @@ func (h *Handler) startJobs() {
|
|||
items := listItems(feed)
|
||||
h.db.CreateItems(items)
|
||||
atomic.AddInt32(h.queueSize, -1)
|
||||
if !feed.HasIcon {
|
||||
icon, err := findFavicon(feed.Link, feed.FeedLink)
|
||||
if icon != nil {
|
||||
h.db.UpdateFeedIcon(feed.Id, icon)
|
||||
}
|
||||
if err != nil {
|
||||
h.log.Print(err)
|
||||
}
|
||||
}
|
||||
case <- delTicker.C:
|
||||
h.db.DeleteOldItems()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue