mirror of
http://gitea.phreedom.club/localhost_frssoft/funkwlmpv
synced 2024-11-25 01:31:28 +00:00
require more tests
This commit is contained in:
parent
6c7bcf476f
commit
2301adac39
|
@ -2,6 +2,7 @@ import subprocess
|
||||||
import os
|
import os
|
||||||
import json
|
import json
|
||||||
import threading
|
import threading
|
||||||
|
import time
|
||||||
from src.mpv_control import player
|
from src.mpv_control import player
|
||||||
from loguru import logger
|
from loguru import logger
|
||||||
'''Warning! This module can be very battery drain'''
|
'''Warning! This module can be very battery drain'''
|
||||||
|
@ -11,6 +12,7 @@ from loguru import logger
|
||||||
def handle_vol_lvl_as_switch_track():
|
def handle_vol_lvl_as_switch_track():
|
||||||
volume_diff = []
|
volume_diff = []
|
||||||
while True:
|
while True:
|
||||||
|
debug_time = time.time()
|
||||||
volume = subprocess.Popen("termux-volume", stdout=subprocess.PIPE).stdout
|
volume = subprocess.Popen("termux-volume", stdout=subprocess.PIPE).stdout
|
||||||
json_volume = json.loads(volume.read())
|
json_volume = json.loads(volume.read())
|
||||||
for i in json_volume:
|
for i in json_volume:
|
||||||
|
@ -26,6 +28,10 @@ def handle_vol_lvl_as_switch_track():
|
||||||
pass
|
pass
|
||||||
os.system(f'termux-volume music {before}')
|
os.system(f'termux-volume music {before}')
|
||||||
volume_diff = []
|
volume_diff = []
|
||||||
|
debug_time2 = time.time()
|
||||||
|
total = debug_time2 - debug_time
|
||||||
|
print(total)
|
||||||
|
time.sleep(0.300)
|
||||||
|
|
||||||
|
|
||||||
handle_vol_lvl = threading.Thread(
|
handle_vol_lvl = threading.Thread(
|
||||||
|
|
Loading…
Reference in a new issue