From 2301adac39bf3c635a553a88e8a196f2d6776b48 Mon Sep 17 00:00:00 2001 From: localhost_frssoft Date: Thu, 3 Aug 2023 18:58:17 +0300 Subject: [PATCH] require more tests --- src/android_termux_api.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/android_termux_api.py b/src/android_termux_api.py index 9809da7..b5b38d7 100644 --- a/src/android_termux_api.py +++ b/src/android_termux_api.py @@ -2,6 +2,7 @@ import subprocess import os import json import threading +import time from src.mpv_control import player from loguru import logger '''Warning! This module can be very battery drain''' @@ -11,6 +12,7 @@ from loguru import logger def handle_vol_lvl_as_switch_track(): volume_diff = [] while True: + debug_time = time.time() volume = subprocess.Popen("termux-volume", stdout=subprocess.PIPE).stdout json_volume = json.loads(volume.read()) for i in json_volume: @@ -26,6 +28,10 @@ def handle_vol_lvl_as_switch_track(): pass os.system(f'termux-volume music {before}') volume_diff = [] + debug_time2 = time.time() + total = debug_time2 - debug_time + print(total) + time.sleep(0.300) handle_vol_lvl = threading.Thread(