Added ability to set the weight of an item in updateMediaById() method