summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorByteHamster <ByteHamster@users.noreply.github.com>2024-04-09 22:33:31 +0200
committerGitHub <noreply@github.com>2024-04-09 22:33:31 +0200
commitbd4e9e19d732de045260fcd7fd2870421f0a4d19 (patch)
treeb5cc04cee70649d3fee66203ba26ae25d2315750 /net
parente578f4ca93f6292f62e4b4c7fa11d17fe0b27c71 (diff)
downloadAntennaPod-bd4e9e19d732de045260fcd7fd2870421f0a4d19.zip
Don't allow downloading already downloaded episdoes again (#7076)
Diffstat (limited to 'net')
-rw-r--r--net/download/service/src/main/java/de/danoeh/antennapod/net/download/service/feed/DownloadServiceInterfaceImpl.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/download/service/src/main/java/de/danoeh/antennapod/net/download/service/feed/DownloadServiceInterfaceImpl.java b/net/download/service/src/main/java/de/danoeh/antennapod/net/download/service/feed/DownloadServiceInterfaceImpl.java
index 37a7f30e0..0b5be92b8 100644
--- a/net/download/service/src/main/java/de/danoeh/antennapod/net/download/service/feed/DownloadServiceInterfaceImpl.java
+++ b/net/download/service/src/main/java/de/danoeh/antennapod/net/download/service/feed/DownloadServiceInterfaceImpl.java
@@ -36,6 +36,9 @@ public class DownloadServiceInterfaceImpl extends DownloadServiceInterface {
}
public void download(Context context, FeedItem item) {
+ if (item.isDownloaded()) {
+ return;
+ }
OneTimeWorkRequest.Builder workRequest = getRequest(context, item);
workRequest.setConstraints(getConstraints());
WorkManager.getInstance(context).enqueueUniqueWork(item.getMedia().getDownloadUrl(),