metadata: fix wrong test leading to incorrect hash calculation

This would have almost always returned true, meaning it would attempt to calculate the hash of a file unlikely to exist locally.
Simplify code + style
mythbackend: fixes QUERY_FILE_HASH hanging

The frontend will typically call the backend with an identifier, and not its IP address. As such, the backend attempt to transfer the QUERY_FILE_HASH command to anoyher backend (which is itself) resulting in an infinite loop

Fixes #12212