Generate an XSPF playlist file for audio and video files using Python