Refactor and improve metadata tasks

Now hits OMDb far more seldom, and is much more readable and testable.