diff options
author | Thanos Apollo <[email protected]> | 2023-08-18 10:04:00 +0300 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2023-08-18 10:04:00 +0300 |
commit | 1a525af84ae77050c38ff604bd183650bd842a81 (patch) | |
tree | 461393d568c9868c504bb4fb32a896d6587c6da6 /yeetube.el | |
parent | bb8cd69540c81094061fe558061f08b6d9877a9d (diff) |
Add yeetube--send-command
Mostly for cycle between values
Diffstat (limited to 'yeetube.el')
-rw-r--r-- | yeetube.el | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -240,6 +240,12 @@ It's recommended you keep it as the default value." (sit-for 0.1) ; wait for the process to finish (with-current-buffer proc-buffer (buffer-string)))) + +(defun yeetube--send-command (property value) + "Send command with PROPERTY and VALUE as json-data to mpv socket." + (let ((json-data (format "{ \"command\": [\"%s\", \"%s\"]}" property value))) + (yeetube-send-command-to-socket yeetube-mpv-socket json-data))) + (defun yeetube-toggle-pause-mpv () "Toggle play/pause mpv." (interactive) |