When VLC is running, it prevents the computer from suspending.
I want it to allow suspend IF VLC is stopped (the media finished playing).
How can this be done?
You could set up a DBus query to get the play state of VLC and kill the process when it's done playing. That should release its hold on suspend state.