mirror of
https://github.com/vbatts/sl-feeds.git
synced 2024-12-26 13:56:31 +00:00
feeds: report updates differently
If there are "0 updates" then don't report as such. Found as http://bear.alienbase.nl/mirrors//alien-kde/ChangeLog.txt updates don't match the same regex as slackware update entries, so it reported 0 updates. This is a TODO to improve that regex. Reported-by: alienBob Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
parent
cf4e6740bb
commit
1cca828855
1 changed files with 3 additions and 1 deletions
|
@ -44,8 +44,10 @@ func ToFeed(link string, entries []Entry) (*feeds.Feed, error) {
|
|||
}
|
||||
if e.SecurityFix() {
|
||||
feed.Items[i].Title = fmt.Sprintf("%d %s. Including a %s!", len(e.Updates), updateWord, securityFixStr)
|
||||
} else if len(e.Updates) == 0 {
|
||||
feed.Items[i].Title = ""
|
||||
} else {
|
||||
feed.Items[i].Title = fmt.Sprintf("%d %s.", len(e.Updates), updateWord)
|
||||
feed.Items[i].Title = fmt.Sprintf("%d %s", len(e.Updates), updateWord)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue