def main():
    """
    Main function.
    """
    msg = ''
    try:
        songs = parse_argv()
        if not songs:
            msg = 'No songs specified'
    except ValueError as error:
        msg = str(error)
    if msg:
        logger.error('%s: Error: %s', sys.argv[0], msg)
        return 1

    logger.debug('Running with %s', songs)
    try:
        run(songs)
    except KeyboardInterrupt:
        print('Interrupted')
        return 1

    return 0