mirror of
https://github.com/AntennaPod/AntennaPod.git
synced 2024-12-23 07:25:25 +01:00
Make sure episode contain media before adding them to queue
This commit is contained in:
parent
ce659f5cb2
commit
7f1c24e26c
@ -457,8 +457,15 @@ public class EpisodesApplyActionFragment extends Fragment {
|
||||
}
|
||||
|
||||
private void queueChecked() {
|
||||
DBWriter.addQueueItem(getActivity(), true, checkedIds.toArray());
|
||||
close(R.plurals.added_to_queue_batch_label, checkedIds.size());
|
||||
// Check if an episode actually contains any media files before adding it to queue
|
||||
LongList toQueue = new LongList(checkedIds.size());
|
||||
for (FeedItem episode : episodes) {
|
||||
if (checkedIds.contains(episode.getId()) && episode.hasMedia()) {
|
||||
toQueue.add(episode.getId());
|
||||
}
|
||||
}
|
||||
DBWriter.addQueueItem(getActivity(), true, toQueue.toArray());
|
||||
close(R.plurals.added_to_queue_batch_label, toQueue.size());
|
||||
}
|
||||
|
||||
private void removeFromQueueChecked() {
|
||||
|
Loading…
Reference in New Issue
Block a user