diff options
author | ByteHamster <ByteHamster@users.noreply.github.com> | 2021-11-17 21:07:41 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-17 21:07:41 +0100 |
commit | efe66b20049d7e695792843ca0d91693b5aa1819 (patch) | |
tree | 64a1daa44d05cffb48a91463c36197c03fccab50 | |
parent | d9bf519708f72b61f0145bf8871e0ddf84d89ba7 (diff) | |
parent | b766a22a2980b715f01808e717606ea6a6599f7f (diff) | |
download | AntennaPod-efe66b20049d7e695792843ca0d91693b5aa1819.zip |
Merge pull request #5554 from ByteHamster/no-duplicate-no-log
Reduce duplicate warnings
-rw-r--r-- | core/src/main/java/de/danoeh/antennapod/core/storage/DBTasks.java | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/core/src/main/java/de/danoeh/antennapod/core/storage/DBTasks.java b/core/src/main/java/de/danoeh/antennapod/core/storage/DBTasks.java index 30a22d595..68bc9c5f8 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/storage/DBTasks.java +++ b/core/src/main/java/de/danoeh/antennapod/core/storage/DBTasks.java @@ -455,12 +455,17 @@ public final class DBTasks { for (int idx = 0; idx < newFeed.getItems().size(); idx++) { final FeedItem item = newFeed.getItems().get(idx); - if (item != searchFeedItemGuessDuplicate(newFeed.getItems(), item)) { + FeedItem possibleDuplicate = searchFeedItemGuessDuplicate(newFeed.getItems(), item); + if (possibleDuplicate != null && item != possibleDuplicate) { // Canonical episode is the first one returned (usually oldest) DBWriter.addDownloadStatus(new DownloadStatus(savedFeed, item.getTitle(), DownloadError.ERROR_PARSER_EXCEPTION_DUPLICATE, false, "The podcast host appears to have added the same episode twice. " - + "AntennaPod attempted to repair it.", false)); + + "AntennaPod still refreshed the feed and attempted to repair it." + + "{" + possibleDuplicate.getTitle() + "} with ID " + + possibleDuplicate.getItemIdentifier() + + " seems to be the same as {" + item.getTitle() + "} with ID " + + item.getItemIdentifier(), false)); continue; } @@ -472,7 +477,8 @@ public final class DBTasks { DBWriter.addDownloadStatus(new DownloadStatus(savedFeed, item.getTitle(), DownloadError.ERROR_PARSER_EXCEPTION_DUPLICATE, false, "The podcast host changed the ID of an existing episode instead of just " - + "updating the episode itself. AntennaPod attempted to repair it.\n\n" + + "updating the episode itself. AntennaPod still refreshed the feed and " + + "attempted to repair it.\n\n" + "{" + oldItem.getTitle() + "} with ID " + oldItem.getItemIdentifier() + " seems to be the same as {" + item.getTitle() + "} with ID " + item.getItemIdentifier(), false)); |