mirror of
https://github.com/glanceapp/glance.git
synced 2024-11-24 17:35:06 +01:00
Fix RSS thumbnails where feed image is absolute
This commit is contained in:
parent
9843b4d218
commit
a5981b3106
@ -161,7 +161,11 @@ func getItemsFromRSSFeedTask(request RSSFeedRequest) ([]RSSFeedItem, error) {
|
||||
} else if url := findThumbnailInItemExtensions(item); url != "" {
|
||||
rssItem.ImageURL = url
|
||||
} else if feed.Image != nil {
|
||||
rssItem.ImageURL = feed.Image.URL
|
||||
if len(feed.Image.URL) > 0 && feed.Image.URL[0] == '/' {
|
||||
rssItem.ImageURL = strings.TrimRight(feed.Link, "/") + feed.Image.URL
|
||||
} else {
|
||||
rssItem.ImageURL = feed.Image.URL
|
||||
}
|
||||
}
|
||||
|
||||
if item.PublishedParsed != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user