Delegating media_type from media_entry to media_file

and remove similar code in media_entry