diff options
author | ByteHamster <ByteHamster@users.noreply.github.com> | 2023-05-06 17:54:47 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-06 17:54:47 +0200 |
commit | eaae6585d60be4c2796d650ab2d7ee15a7d88c6a (patch) | |
tree | 26776c5a54e7191ef07e0bdf751431421be700c8 | |
parent | 6d7bfef8a5fe8180f13904739996bb2b8de8a0d4 (diff) | |
download | AntennaPod-eaae6585d60be4c2796d650ab2d7ee15a7d88c6a.zip |
Don't show error when download was cancelled (#6476)
-rw-r--r-- | core/src/main/java/de/danoeh/antennapod/core/service/FeedUpdateWorker.java | 2 | ||||
-rw-r--r-- | core/src/main/java/de/danoeh/antennapod/core/service/download/HttpDownloader.java | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/core/src/main/java/de/danoeh/antennapod/core/service/FeedUpdateWorker.java b/core/src/main/java/de/danoeh/antennapod/core/service/FeedUpdateWorker.java index 5f59f0c41..b9618f201 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/service/FeedUpdateWorker.java +++ b/core/src/main/java/de/danoeh/antennapod/core/service/FeedUpdateWorker.java @@ -146,7 +146,7 @@ public class FeedUpdateWorker extends Worker { downloader.call(); if (!downloader.getResult().isSuccessful()) { - if (downloader.cancelled) { + if (downloader.cancelled || downloader.getResult().getReason() == DownloadError.ERROR_DOWNLOAD_CANCELLED) { return; } DBWriter.setFeedLastUpdateFailed(request.getFeedfileId(), true); diff --git a/core/src/main/java/de/danoeh/antennapod/core/service/download/HttpDownloader.java b/core/src/main/java/de/danoeh/antennapod/core/service/download/HttpDownloader.java index 949f9966b..6de5e7006 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/service/download/HttpDownloader.java +++ b/core/src/main/java/de/danoeh/antennapod/core/service/download/HttpDownloader.java @@ -317,6 +317,7 @@ public class HttpDownloader extends Downloader { private void onCancelled() { Log.d(TAG, "Download was cancelled"); result.setCancelled(); + cancelled = true; cleanup(); } |