My guess would be to try the AlbumObjectOrderer Class
AlbumObject[] sort(AlbumObject[] objects)
method.
That is part of
Interface AlbumObject and has the method
moveTo(AlbumObject newParent, int position)
Never tried to use it but it seems the closest thing to what you want, assuming you already have the code to implement your ‘special rules’.
Sorry, but that’s the best I can suggest, maybe someone else will have an idea.
Edited by: RobM on 2 Dec 2024, 10:53