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

Do not try to update a duplicated feed after a refresh

This commit is contained in:
Frédéric Guillot 2020-09-20 23:29:51 -07:00
parent e6c6ee441a
commit 0d0395b4e3
2 changed files with 15 additions and 0 deletions

View file

@ -127,6 +127,13 @@ func (h *Handler) RefreshFeed(userID, feedID int64) error {
return requestErr
}
if h.store.AnotherFeedURLExists(userID, originalFeed.ID, response.EffectiveURL) {
storeErr := errors.NewLocalizedError(errDuplicate, response.EffectiveURL)
originalFeed.WithError(storeErr.Error())
h.store.UpdateFeedError(originalFeed)
return storeErr
}
if originalFeed.IgnoreHTTPCache || response.IsModified(originalFeed.EtagHeader, originalFeed.LastModifiedHeader) {
logger.Debug("[Handler:RefreshFeed] Feed #%d has been modified", feedID)