added a couple of methods to the Media class in wsgi