diff options
author | ByteHamster <ByteHamster@users.noreply.github.com> | 2021-09-06 17:59:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-06 17:59:17 +0200 |
commit | b36cdb0c4ecb987b1a8e0168c15552c7c11d03a1 (patch) | |
tree | 02c4645f0ef82fb76d7c2fe575df8aa3ac33d130 /app/src/main/java/de/danoeh/antennapod/adapter | |
parent | b9f578ed5c83dff7ebf70e2fb5d6ded9c9d4482f (diff) | |
download | AntennaPod-b36cdb0c4ecb987b1a8e0168c15552c7c11d03a1.zip |
Improvements related to duplicate detection (#5387)
* Move duplicate detection to one single place
* Canonicalize some common characters that are often confused
* Assume same episode even when date is off by 1 week
* Display duplicate detection as warning, not error
Diffstat (limited to 'app/src/main/java/de/danoeh/antennapod/adapter')
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/adapter/DownloadLogAdapter.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/adapter/DownloadLogAdapter.java b/app/src/main/java/de/danoeh/antennapod/adapter/DownloadLogAdapter.java index 740636c77..1e7ce4426 100644 --- a/app/src/main/java/de/danoeh/antennapod/adapter/DownloadLogAdapter.java +++ b/app/src/main/java/de/danoeh/antennapod/adapter/DownloadLogAdapter.java @@ -21,6 +21,7 @@ import de.danoeh.antennapod.core.storage.DBReader; import de.danoeh.antennapod.core.storage.DBTasks; import de.danoeh.antennapod.core.storage.DownloadRequestException; import de.danoeh.antennapod.core.storage.DownloadRequester; +import de.danoeh.antennapod.core.util.DownloadError; import de.danoeh.antennapod.model.feed.Feed; import de.danoeh.antennapod.model.feed.FeedMedia; import de.danoeh.antennapod.ui.common.ThemeUtils; @@ -101,8 +102,13 @@ public class DownloadLogAdapter extends BaseAdapter { holder.reason.setVisibility(View.GONE); holder.tapForDetails.setVisibility(View.GONE); } else { - holder.icon.setTextColor(ContextCompat.getColor(context, R.color.download_failed_red)); - holder.icon.setText("{fa-times-circle}"); + if (status.getReason() == DownloadError.ERROR_PARSER_EXCEPTION_DUPLICATE) { + holder.icon.setTextColor(ContextCompat.getColor(context, R.color.download_warning_yellow)); + holder.icon.setText("{fa-exclamation-circle}"); + } else { + holder.icon.setTextColor(ContextCompat.getColor(context, R.color.download_failed_red)); + holder.icon.setText("{fa-times-circle}"); + } holder.icon.setContentDescription(context.getString(R.string.error_label)); holder.reason.setText(status.getReason().getErrorString(context)); holder.reason.setVisibility(View.VISIBLE); |