|
@@ -53,6 +53,7 @@ func CreateFeedFromSubscriptionDiscovery(store *storage.Storage, userID int64, f
|
|
|
subscription.Username = feedCreationRequest.Username
|
|
subscription.Username = feedCreationRequest.Username
|
|
|
subscription.Password = feedCreationRequest.Password
|
|
subscription.Password = feedCreationRequest.Password
|
|
|
subscription.Crawler = feedCreationRequest.Crawler
|
|
subscription.Crawler = feedCreationRequest.Crawler
|
|
|
|
|
+ subscription.IgnoreEntryUpdates = feedCreationRequest.IgnoreEntryUpdates
|
|
|
subscription.Disabled = feedCreationRequest.Disabled
|
|
subscription.Disabled = feedCreationRequest.Disabled
|
|
|
subscription.IgnoreHTTPCache = feedCreationRequest.IgnoreHTTPCache
|
|
subscription.IgnoreHTTPCache = feedCreationRequest.IgnoreHTTPCache
|
|
|
subscription.AllowSelfSignedCertificates = feedCreationRequest.AllowSelfSignedCertificates
|
|
subscription.AllowSelfSignedCertificates = feedCreationRequest.AllowSelfSignedCertificates
|
|
@@ -154,6 +155,7 @@ func CreateFeed(store *storage.Storage, userID int64, feedCreationRequest *model
|
|
|
subscription.Username = feedCreationRequest.Username
|
|
subscription.Username = feedCreationRequest.Username
|
|
|
subscription.Password = feedCreationRequest.Password
|
|
subscription.Password = feedCreationRequest.Password
|
|
|
subscription.Crawler = feedCreationRequest.Crawler
|
|
subscription.Crawler = feedCreationRequest.Crawler
|
|
|
|
|
+ subscription.IgnoreEntryUpdates = feedCreationRequest.IgnoreEntryUpdates
|
|
|
subscription.Disabled = feedCreationRequest.Disabled
|
|
subscription.Disabled = feedCreationRequest.Disabled
|
|
|
subscription.IgnoreHTTPCache = feedCreationRequest.IgnoreHTTPCache
|
|
subscription.IgnoreHTTPCache = feedCreationRequest.IgnoreHTTPCache
|
|
|
subscription.AllowSelfSignedCertificates = feedCreationRequest.AllowSelfSignedCertificates
|
|
subscription.AllowSelfSignedCertificates = feedCreationRequest.AllowSelfSignedCertificates
|
|
@@ -338,8 +340,10 @@ func RefreshFeed(store *storage.Storage, userID, feedID int64, forceRefresh bool
|
|
|
originalFeed.Entries = updatedFeed.Entries
|
|
originalFeed.Entries = updatedFeed.Entries
|
|
|
processor.ProcessFeedEntries(store, originalFeed, userID, forceRefresh)
|
|
processor.ProcessFeedEntries(store, originalFeed, userID, forceRefresh)
|
|
|
|
|
|
|
|
- // We don't update existing entries when the crawler is enabled (we crawl only inexisting entries). Unless it is forced to refresh
|
|
|
|
|
- updateExistingEntries := forceRefresh || !originalFeed.Crawler
|
|
|
|
|
|
|
+ // We don't update existing entries when the crawler is enabled (we crawl only inexisting entries).
|
|
|
|
|
+ // We also skip updating existing entries if the feed has ignore_entry_updates enabled.
|
|
|
|
|
+ // Unless it is forced to refresh.
|
|
|
|
|
+ updateExistingEntries := forceRefresh || (!originalFeed.Crawler && !originalFeed.IgnoreEntryUpdates)
|
|
|
newEntries, storeErr := store.RefreshFeedEntries(originalFeed.UserID, originalFeed.ID, originalFeed.Entries, updateExistingEntries)
|
|
newEntries, storeErr := store.RefreshFeedEntries(originalFeed.UserID, originalFeed.ID, originalFeed.Entries, updateExistingEntries)
|
|
|
if storeErr != nil {
|
|
if storeErr != nil {
|
|
|
localizedError := locale.NewLocalizedErrorWrapper(storeErr, "error.database_error", storeErr)
|
|
localizedError := locale.NewLocalizedErrorWrapper(storeErr, "error.database_error", storeErr)
|