mirror of
https://github.com/AntennaPod/AntennaPod.git
synced 2025-01-31 10:54:50 +01:00
Fix NPE in duplicate detection
This commit is contained in:
parent
1e94fa59ea
commit
669705f75d
@ -359,8 +359,11 @@ public final class DBTasks {
|
||||
&& TextUtils.equals(item.getMedia().getStreamUrl(), searchItem.getMedia().getStreamUrl())) {
|
||||
return item;
|
||||
} else if (titlesLookSimilar(item.getTitle(), searchItem.getTitle())) {
|
||||
if (searchItem.getPubDate() == null || item.getPubDate() == null) {
|
||||
continue;
|
||||
}
|
||||
long dateOriginal = item.getPubDate().getTime();
|
||||
long dateNew = searchItem.getPubDate() == null ? 0 : searchItem.getPubDate().getTime();
|
||||
long dateNew = searchItem.getPubDate().getTime();
|
||||
if (Math.abs(dateOriginal - dateNew) < 7L * 24L * 3600L * 1000L) { // Same week
|
||||
return item;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user