def volume_inc(payload): vol_delta = get_volume_delta(payload) for _ in range(vol_delta): mb.send_request(4) text = f'Увеличила громкость на {vol_delta}' tts = f'Увил+ичила гр+омкость на {vol_delta}' return text, tts
def volume_dec(payload): vol_delta = get_volume_delta(payload) for _ in range(vol_delta): mb.send_request(5) text = f'Уменьшила громкость на {vol_delta}' tts = f'Ум+еньшила гр+омкость на {vol_delta}' return text, tts
def push_button(): button_id = request.args.to_dict().get('id') code = send_request(button_id) if code == 200: resp = make_response({'status': 'ok'}) else: resp = make_response({'status': 'ERROR', 'code': code}) return resp
def pause(): mb.send_request(18) text = 'Сделано!' tts = 'Сд+елано!' return text, tts
def mute(): mb.send_request(6) text = 'Сделано!' tts = 'Сд+елано!' return text, tts
def open_menu(): mb.send_request(15) text = 'Открыла меню' tts = 'Откр+ыла мен+ю' return text, tts
def right(): mb.send_request(12) text = 'Сделано!' tts = 'Сд+елано!' return text, tts
def left(): mb.send_request(10) text = 'Сделано!' tts = 'Сд+елано!' return text, tts
def down(): mb.send_request(13) text = 'Сделано!' tts = 'Сд+елано!' return text, tts
def up(): mb.send_request(11) text = 'Сделано!' tts = 'Сд+елано!' return text, tts
def search(): mb.send_request(16) text = 'Сделано!' tts = 'Сд+елано!' return text, tts
def power_tv(): mb.send_request(3) text = 'Сделано!' tts = 'Сд+елано!' return text, tts
def back(): mb.send_request(14) text = 'Сделано!' tts = 'Сд+елано!' return text, tts
def ok(): mb.send_request(9) text = 'Сделано!' tts = 'Сд+елано!' return text, tts