def _play(files, subs):
    # launch external player
    args = files
    # make sure subs is as long as args so as to not cut it when zipping them together
    subs = subs + [None] * (len(files) - len(subs))

    if mplayer.variant != 'undefined':
        # if we have mplayer (or one of its variant) installed, use it with
        # subtitles support
        opts = []
        return mplayer.play(files, subs, opts)

    elif sys.platform == 'linux2':
        action = 'xdg-open'
        # FIXME: xdg-open only accepts 1 argument, this will break movies split in multiple files...
        args = args[:1]

        # if we have smplayer installed, use it with subtitles support
        if os.system('which smplayer') == 0:
            action = 'smplayer'
            args = [ '-fullscreen', '-close-at-end' ]
            for video, subfile in zip(files, subs):
                args.append(video)
                if subfile:
                    args += [ '-sub', subfile ]

    elif sys.platform == 'darwin':
        action = 'open'

    elif sys.platform == 'win32':
        action = 'open'


    log.info('launching %s with args = %s' % (action, str(args)))
    subprocess.call([action]+args)