How to clean up thumbnail in agent

It is possible to remove thumbnail using validate_keys. However, if the thumbnail is selected, even the agent remove it. It will remains in the metadata. However, local assets agent does’t not have this problem.

Here is my code

valid_keys = []
thumb_result = get_episode_thumb(media, season, episode)
if thumb_result is not None:
    thumb_path, thumb_hash, thumb = thumb_result
    valid_keys.append(thumb_hash)
    if thumb_hash not in thumb_meta:
        thumb_meta[thumb_hash] = thumb  # thumb_meta = media.seasons[season].episodes[episode].thumbs
thumb_meta.validate_keys(valid_keys)

Moreover, if I use a static value instead of thumb_hash, the thumbnail will not update even I updated the “Proxy.media”.

This looks to be the exact same issue as described over here (except for thumbnails instead of posters).