mirror of
https://github.com/miniflux/v2.git
synced 2025-06-27 16:36:00 +00:00
rss: use Channel tags only if there is no Item tags
This commit is contained in:
parent
7ee4a731af
commit
ad1d349a0c
2 changed files with 9 additions and 7 deletions
|
@ -123,11 +123,13 @@ func (r *RSSAdapter) BuildFeed(baseURL string) *model.Feed {
|
|||
// Populate entry categories.
|
||||
entry.Tags = append(entry.Tags, item.Categories...)
|
||||
entry.Tags = append(entry.Tags, item.MediaCategories.Labels()...)
|
||||
entry.Tags = append(entry.Tags, r.rss.Channel.Categories...)
|
||||
entry.Tags = append(entry.Tags, r.rss.Channel.GetItunesCategories()...)
|
||||
if len(entry.Tags) == 0 {
|
||||
entry.Tags = append(entry.Tags, r.rss.Channel.Categories...)
|
||||
entry.Tags = append(entry.Tags, r.rss.Channel.GetItunesCategories()...)
|
||||
|
||||
if r.rss.Channel.GooglePlayCategory.Text != "" {
|
||||
entry.Tags = append(entry.Tags, r.rss.Channel.GooglePlayCategory.Text)
|
||||
if r.rss.Channel.GooglePlayCategory.Text != "" {
|
||||
entry.Tags = append(entry.Tags, r.rss.Channel.GooglePlayCategory.Text)
|
||||
}
|
||||
}
|
||||
|
||||
feed.Entries = append(feed.Entries, entry)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue