Add support to remove multiple media items at given list of indices
@marcbaechinger is already working on this.
Since Feb 16, 2024.
- Dominant language
- Java
- Stars
- 3k
- Forks
- 955
- Avg merge
- 12d 14h
- Merged PRs (30d)
- 2
Description
UseCase
Currently mediaBrowser.removeMediaItems takes index or range of indices to remove items from mediaBrowser queue. I have a local Audio Player application, in which there is a scenario to remove multiple items from the queue, which may be 100+ items and their indices may or may not be in consecutive sequence. So I need to remove them 1 by 1. Running this on mainThread takes too much time and causes an ANR in my app.
Tried Solution
I tried to filter the list and separate out the indices and range from the list and remove range wherever possible. But still if a list of indices has no adjacent values in it, I have to iterate through the whole list 1 by 1.
Proposed Solution
I'm proposing a solution to add a new method, that could take a list of indices List<Int> and remove all the required items in a single go.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.