Media API methods refactoring