mirror of
https://github.com/truewhile/MeBox.git
synced 2026-10-06 21:36:37 +08:00
fix subscription dedup availability tracking
This commit is contained in:
@@ -315,6 +315,7 @@ func (s *SubscriptionService) enqueueRSSSubscriptionCandidate(ctx context.Contex
|
||||
AllowExistingLibrary: sub.WashEnabled,
|
||||
}); err != nil {
|
||||
if IsDownloadDedupError(err) {
|
||||
state.markCandidateAvailable(candidate)
|
||||
state.markSeen(candidate.GUID)
|
||||
return false
|
||||
}
|
||||
@@ -358,6 +359,12 @@ func (state *rssSubscriptionRunState) markTitleAvailable(title string) {
|
||||
}
|
||||
}
|
||||
|
||||
func (state *rssSubscriptionRunState) markCandidateAvailable(candidate siteSearchCandidate) {
|
||||
if state.washOff {
|
||||
addSiteSearchCandidateAvailability(candidate, &state.availability)
|
||||
}
|
||||
}
|
||||
|
||||
func (state *rssSubscriptionRunState) markSeen(guid string) {
|
||||
state.seen = append(state.seen, guid)
|
||||
if state.seenSet != nil {
|
||||
|
||||
Reference in New Issue
Block a user