I just wrote a quick example so it might not be totally correct.
Maybe that's weird? I don't really expect people to add totally different metadata in the middle of a scene, so replacing shouldn't be an issue.
Edit: I'm not quite sure the above is correct
I think the metadata is still appended, without replacing anything. This should be simple to test..
Really need to start documenting the editor.
Since the indices start at 0, the last frame is usually frame count - 1.
Otherwise you would get an error when trying to edit.
I should probably have worded the last_frame as frame_count instead.