def repeat_str(state):
    """Convert internal API repeat state to string."""
    if state == const.REPEAT_STATE_OFF:
        return 'Off'
    if state == const.REPEAT_STATE_TRACK:
        return 'Track'
    if state == const.REPEAT_STATE_ALL:
        return 'All'
    return 'Unsupported'
Convert internal API repeat state to string.