Don't detect items without GUID as duplicates

This commit is contained in:
ByteHamster 2021-07-17 18:00:05 +02:00
parent ca9ad0d2d3
commit 799ae93c14
1 changed files with 2 additions and 2 deletions

View File

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