Fix bug in the media property

Since the list of media files where always appended to the media field it grow-ed every time it was accessed. This fixes the bug by clearing the array before repopulating it.