1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-08-11 17:51:01 +00:00

feat(googlereader): add feed icon field, endpoint

Adds an endpoint to the Google Reader integration to serve
feed icon URLs.
This commit is contained in:
Josiah Campbell 2025-03-03 22:38:56 -06:00 committed by Frédéric Guillot
parent e342a4f143
commit df8bc742fb
5 changed files with 149 additions and 17 deletions

View file

@ -163,6 +163,7 @@ func (f *FeedQueryBuilder) GetFeeds() (model.Feeds, error) {
c.title as category_title,
c.hide_globally as category_hidden,
fi.icon_id,
i.external_id,
u.timezone,
f.apprise_service_urls,
f.webhook_url,
@ -178,6 +179,8 @@ func (f *FeedQueryBuilder) GetFeeds() (model.Feeds, error) {
categories c ON c.id=f.category_id
LEFT JOIN
feed_icons fi ON fi.feed_id=f.id
LEFT JOIN
icons i ON i.id=fi.icon_id
LEFT JOIN
users u ON u.id=f.user_id
WHERE %s
@ -201,6 +204,7 @@ func (f *FeedQueryBuilder) GetFeeds() (model.Feeds, error) {
for rows.Next() {
var feed model.Feed
var iconID sql.NullInt64
var externalIconID string
var tz string
feed.Category = &model.Category{}
@ -237,6 +241,7 @@ func (f *FeedQueryBuilder) GetFeeds() (model.Feeds, error) {
&feed.Category.Title,
&feed.Category.HideGlobally,
&iconID,
&externalIconID,
&tz,
&feed.AppriseServiceURLs,
&feed.WebhookURL,
@ -253,9 +258,9 @@ func (f *FeedQueryBuilder) GetFeeds() (model.Feeds, error) {
}
if iconID.Valid {
feed.Icon = &model.FeedIcon{FeedID: feed.ID, IconID: iconID.Int64}
feed.Icon = &model.FeedIcon{FeedID: feed.ID, IconID: iconID.Int64, ExternalIconID: externalIconID}
} else {
feed.Icon = &model.FeedIcon{FeedID: feed.ID, IconID: 0}
feed.Icon = &model.FeedIcon{FeedID: feed.ID, IconID: 0, ExternalIconID: ""}
}
if readCounters != nil {