better duplicate handling, remove medias which do no longer exist