had some time and this was more interesting than doing other things. So I took a look at the code..
It might be as simple as doing this in generate_collections.py
Code:
for i in range(0,len(collection.ebooks),400):
new_collection = collection.ebooks[i:i+400]
cc.update_collections_entry(collection.uuid,
[e.uuid for e in new_collection])
that seems to break up the long members array into groups of 400 with all the correct preambles preserved.. will test it tomorrow. Hope that I don't need to send less commands at one go. assuming that the issue is the length of a single command and not the total number of small commands sent.. will find out tomorrow in any case..