From 2058f3c0b341b483c8f653618ba338fb028f31e9 Mon Sep 17 00:00:00 2001 From: orionlee Date: Sat, 12 May 2018 13:37:50 -0700 Subject: [PATCH] #2577: ensure that during feeds update, automatic (episodes) download will download the latest ones by waiting the feeds update complete before starting autodownload. --- .../java/de/danoeh/antennapod/core/storage/DBTasks.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/de/danoeh/antennapod/core/storage/DBTasks.java b/core/src/main/java/de/danoeh/antennapod/core/storage/DBTasks.java index da500fd3e..d6612e404 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/storage/DBTasks.java +++ b/core/src/main/java/de/danoeh/antennapod/core/storage/DBTasks.java @@ -198,8 +198,10 @@ public final class DBTasks { if (ClientConfig.gpodnetCallbacks.gpodnetEnabled()) { GpodnetSyncService.sendSyncIntent(context); } - Log.d(TAG, "refreshAllFeeds autodownload"); - autodownloadUndownloadedItems(context); + // Note: automatic download of episodes will be done but not here. + // Instead it is done after all feeds have been refreshed (asynchronously), + // in DownloadService.onDestroy() + // See Issue #2577 for the details of the rationale if (callback != null) { callback.run();