Merge pull request #3730 from txtd/develop

Check if an episode has media before adding it to download batch
This commit is contained in:
H. Lehmann 2020-01-05 14:51:58 +01:00 committed by GitHub
commit a8b126221c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -480,7 +480,7 @@ public class EpisodesApplyActionFragment extends Fragment {
// download the check episodes in the same order as they are currently displayed // download the check episodes in the same order as they are currently displayed
List<FeedItem> toDownload = new ArrayList<>(checkedIds.size()); List<FeedItem> toDownload = new ArrayList<>(checkedIds.size());
for(FeedItem episode : episodes) { for(FeedItem episode : episodes) {
if(checkedIds.contains(episode.getId())) { if(checkedIds.contains(episode.getId()) && episode.hasMedia()) {
toDownload.add(episode); toDownload.add(episode);
} }
} }
@ -490,7 +490,7 @@ public class EpisodesApplyActionFragment extends Fragment {
e.printStackTrace(); e.printStackTrace();
DownloadRequestErrorDialogCreator.newRequestErrorDialog(getActivity(), e.getMessage()); DownloadRequestErrorDialogCreator.newRequestErrorDialog(getActivity(), e.getMessage());
} }
close(R.plurals.downloading_batch_label, checkedIds.size()); close(R.plurals.downloading_batch_label, toDownload.size());
} }
private void deleteChecked() { private void deleteChecked() {