Merge pull request #5279 from ByteHamster/dont-remove-without-guid

Don't detect items without GUID as duplicates
This commit is contained in:
ByteHamster 2021-07-18 10:02:11 +02:00 committed by GitHub
commit dc3e58a188
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -57,7 +57,7 @@ public class FeedHandler {
Iterator<FeedItem> it = list.iterator();
while (it.hasNext()) {
FeedItem item = it.next();
if (seen.contains(item.getItemIdentifier())) {
if (!TextUtils.isEmpty(item.getItemIdentifier()) && seen.contains(item.getItemIdentifier())) {
Log.d(TAG, "Removing duplicate episode guid " + item.getItemIdentifier());
it.remove();
continue;
@ -71,7 +71,7 @@ public class FeedHandler {
it.remove();
} else {
seen.add(item.getMedia().getStreamUrl());
if (TextUtils.isEmpty(item.getTitle()) || TextUtils.isEmpty(item.getPubDate().toString())) {
if (TextUtils.isEmpty(item.getTitle()) || item.getPubDate() == null) {
continue;
}
if (!seen.contains(item.getTitle() + item.getPubDate().toString())) {