Re-optmizing videos after the original was replaced with a better quality

Here’s one of the other threads I found:

If I hit the retry icon next to the deleted file it optimizes the new file, but with 2000 movies and 20000 TV shows, it can be cumbersome to scan through that list and manually hit the retry. Is there a commandline that would do this for me that I could run thru cron daily?