diff options
| author | Arslaan Pathan <[email protected]> | 2026-10-06 11:07:23 +1300 |
|---|---|---|
| committer | Arslaan Pathan <[email protected]> | 2026-10-06 11:07:23 +1300 |
| commit | 8f5e37d6d8c64bcc7d1d8a78bffb18be1e56a47c (patch) | |
| tree | 1649ad94799845d90f66fb3a4c50b00068d7b95a /main.py | |
| parent | 31516d80bd1ca384074fd61b3c73879b5be2f0ac (diff) | |
| download | remote-automation-8f5e37d6d8c64bcc7d1d8a78bffb18be1e56a47c.tar.xz remote-automation-8f5e37d6d8c64bcc7d1d8a78bffb18be1e56a47c.zip | |
fav song
Diffstat (limited to 'main.py')
| -rw-r--r-- | main.py | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -2,7 +2,7 @@ from evdev import InputDevice, list_devices, ecodes from urllib.request import urlopen from urllib.error import HTTPError, URLError -SCANCODES = {0x11A: "up", 0x148: "down", 0x147: "left", 0x107: "right", 0x106: "ok", 0x141: "play/pause", 0x11c: "power", 0x103: "vol+", 0x142: "vol-", 0x101: "app", 0x154: "1", 0x110: "stop", 0x14b: "skip"} +SCANCODES = {0x11A: "up", 0x148: "down", 0x147: "left", 0x107: "right", 0x106: "ok", 0x141: "play/pause", 0x11c: "power", 0x103: "vol+", 0x142: "vol-", 0x101: "app", 0x154: "1", 0x110: "stop", 0x14b: "skip", 0x155: "epg"} device = None last = 0x00 @@ -33,6 +33,8 @@ def do_action(action: str): homelab_request("music/stop") elif action == "skip": homelab_request("music/next") + elif action == "epg": + homelab_request("music/fav") elif action == "vol+": homelab_request("volup") elif action == "vol-": |
