If there are multiple spaces within the movie file name, e.g., "movie cd1.avi" then the play button will not work. Presumably, you are stripping out the multiple spaces before passing it to the player.
The problem is actually the exec method thats really hard to get working correctly, especially with multiple file names and file names containing spaces.
If you're on windows and use the "Default player" option, you should try to select a custom player. It might work better.