From 7c3e3341c085b8e6f32a58ba1e4c65b5614d0f9c Mon Sep 17 00:00:00 2001 From: txtd Date: Sun, 5 Jan 2020 01:15:03 +0100 Subject: Check if an episode has media before adding it to download batch --- .../java/de/danoeh/antennapod/dialog/EpisodesApplyActionFragment.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/src') diff --git a/app/src/main/java/de/danoeh/antennapod/dialog/EpisodesApplyActionFragment.java b/app/src/main/java/de/danoeh/antennapod/dialog/EpisodesApplyActionFragment.java index bd33bdb19..b19bcc17b 100644 --- a/app/src/main/java/de/danoeh/antennapod/dialog/EpisodesApplyActionFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/dialog/EpisodesApplyActionFragment.java @@ -480,7 +480,7 @@ public class EpisodesApplyActionFragment extends Fragment { // download the check episodes in the same order as they are currently displayed List toDownload = new ArrayList<>(checkedIds.size()); for(FeedItem episode : episodes) { - if(checkedIds.contains(episode.getId())) { + if(checkedIds.contains(episode.getId()) && episode.hasMedia()) { toDownload.add(episode); } } -- cgit v1.2.3 From 22c891ab5b28ed4c43ee0ed65042aafdb4bad00c Mon Sep 17 00:00:00 2001 From: txtd Date: Sun, 5 Jan 2020 01:40:05 +0100 Subject: Display size of toDownload in snackback instead of checkedIds so that size matches the actual number of episodes being downloaded --- .../java/de/danoeh/antennapod/dialog/EpisodesApplyActionFragment.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/src') diff --git a/app/src/main/java/de/danoeh/antennapod/dialog/EpisodesApplyActionFragment.java b/app/src/main/java/de/danoeh/antennapod/dialog/EpisodesApplyActionFragment.java index b19bcc17b..2e1cc2c7d 100644 --- a/app/src/main/java/de/danoeh/antennapod/dialog/EpisodesApplyActionFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/dialog/EpisodesApplyActionFragment.java @@ -490,7 +490,7 @@ public class EpisodesApplyActionFragment extends Fragment { e.printStackTrace(); DownloadRequestErrorDialogCreator.newRequestErrorDialog(getActivity(), e.getMessage()); } - close(R.plurals.downloading_batch_label, checkedIds.size()); + close(R.plurals.downloading_batch_label, toDownload.size()); } private void deleteChecked() { -- cgit v1.2.3