refactor plex metadata