Ensure that collection index is sorted when adding wacz archives to the collection.
Motivation and Context
CDXJ indices must be sorted for the binary search algorithm to work. When adding wacz archives and merging there indices with the collection index, the wacz index was just appended to the end of the collection index and the collection index wasn't sorted anymore.
Screenshots (if appropriate):
Types of changes
[ ] Replay fix (fixes a replay specific issue)
[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
Checklist:
[ ] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.
[x] I have added or updated tests to cover my changes.
Description
Ensure that collection index is sorted when adding wacz archives to the collection.
Motivation and Context
CDXJ indices must be sorted for the binary search algorithm to work. When adding wacz archives and merging there indices with the collection index, the wacz index was just appended to the end of the collection index and the collection index wasn't sorted anymore.
Screenshots (if appropriate):
Types of changes
Checklist: