PIM-3434 : re-work the media manager