Server: Fixed some media scanning bugs.