def play_in_default_player(filename):
    filename = path.sanitize(filename)
    filename = path.make_safe(filename)

    get_thumb(filename)
    if sys.platform == 'win32':
        os.system('start {}'.format(filename))
    elif sys.platform == 'darwin':
        os.system('open {}'.format(filename))
    else:
        os.system('open {}'.format(filename))
Exemplo n.º 2
0
def play(filename=None):
    if not filename:
        filename = get_current_file()
    filename = path.make_safe(filename)
    video.play_in_default_player(filename)
    logger.info('Playing current video: {}'.format(filename.replace('"', '')))