notify ShuffleOrder when media item(s) are moved#2226
notify ShuffleOrder when media item(s) are moved#2226copybara-service[bot] merged 3 commits intoandroidx:mainfrom
Conversation
|
@rohitjoins @icbaker any chance one of you could take a look? |
|
@marcbaechinger ping since it has been a month, any chance you could take a look at this PR? |
marcbaechinger
left a comment
There was a problem hiding this comment.
Thanks for your PR
libraries/exoplayer/src/main/java/androidx/media3/exoplayer/source/ShuffleOrder.java
Show resolved
Hide resolved
|
I'm going to send this for internal review now. You may see some more commits being added as I make changes in response to review feedback. Please refrain from pushing any more substantive changes as it will complicate the internal review - thanks! |
|
Ok, I think I've wrapped my head around what this does. Sorry for the wait and for me being slow. Currently, when items in the playlist are moved, the shuffle order is kept the same. With your change
Yeah, acknowledged adding
I agree with this, but my conclusion would be that the default implementation is a no-op? This would have the advantage that we do not introduce a behavior change to what This would still be useful for your use case as I understand you have your own implementation of I guess I'm going to change that accordingly unless you have some strong argument to inverse that procedure.
|
2868055 to
82b0bb5
Compare
|
Sounds good to me, thanks :) |
|
Thanks, Marc :) |
Issue: #1932
Issue: #1381
--
(Extracting a seperate method
moveMediaSourceHolderswas done to align with insert/remove code. A newdefaultmethod instead of just implementing that inDefaultShuffleOrderwas done because I believe the move detection is not required by simpler shuffle order implementations, and this makes upgrades easier as devs don't have to implement a new function.)