diff options
author | ByteHamster <ByteHamster@users.noreply.github.com> | 2023-09-24 10:03:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-24 10:03:50 +0200 |
commit | 0e52f08aa56a52cd5516cbeb2a85415a99d6963b (patch) | |
tree | 6549c9e30cd4d1baa681188321cec5789203a050 /app/src/main | |
parent | 8073de55af3c7cb749b6be2b80768bc07807e16c (diff) | |
download | AntennaPod-0e52f08aa56a52cd5516cbeb2a85415a99d6963b.zip |
Fix file deletion and queueing after download (#6652)
WorkManager does not tell us whether it was cancelled by
the user (not retried) or by the system (retried later).
So we need to delete the file and remove from queue when
we know that it was actually the user. Also make sure
to always delete the file when the download fails.
Also, don't show "will retry" message on last retry attempt.
Diffstat (limited to 'app/src/main')
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/adapter/actionbutton/CancelDownloadActionButton.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/adapter/actionbutton/CancelDownloadActionButton.java b/app/src/main/java/de/danoeh/antennapod/adapter/actionbutton/CancelDownloadActionButton.java index 8b7a88873..c9500340b 100644 --- a/app/src/main/java/de/danoeh/antennapod/adapter/actionbutton/CancelDownloadActionButton.java +++ b/app/src/main/java/de/danoeh/antennapod/adapter/actionbutton/CancelDownloadActionButton.java @@ -32,7 +32,7 @@ public class CancelDownloadActionButton extends ItemActionButton { @Override public void onClick(Context context) { FeedMedia media = item.getMedia(); - DownloadServiceInterface.get().cancel(context, media.getDownload_url()); + DownloadServiceInterface.get().cancel(context, media); if (UserPreferences.isEnableAutodownload()) { item.disableAutoDownload(); DBWriter.setFeedItem(item); |