From what I understand, the script shouldn't normally open anything. Or hang X-Chat, for that matter, though I could imagine that spawning an application that doesn't terminate immediately could as well hang X-Chat. In that case, the command that tries to determine Mplayer's version is probably at fault. For now, I've stripped the script previously linked down to the essentials, which should probably
That being said, I'm not completely sure whether kmplayer actually has its own version of mplayer built-in or simply spawns mplayer and attaches its GUI there. Thus, I've added checks for open files both for 'mplayer' and 'kmplayer'. If you find it working for you, that's fine, but if not, I'll probably have to install kmplayer to find out for certain.
Link to updated script: http://files.sector-5.net/mplayer2.py