How to reorder videos in bulk?

I have a lot of videos in a lot of playlists, that i would like to reorder using a particular detail from each video’s title.

I would prefer to do this programmatically, but, the API reference point (PeerTube) seems to suggest that the process needs to be run for one video at a time.

Which is even more tiresome due to the fact that the insertAfterPosition and the startPosition parameters required in this endpoint will have changing values, every time an update is done using this endpoint!

What’s a good fix/workaround for this?

Unfortunately there is no workaround at the moment. You’ll have to redorder the playlist and take into account the new position or refetch the playlist the know the new video positions.

(the API can reorder a particular video or a contiguous block of videos)

Maybe by removing all video from the playlist, then adding them again in the correct order?