diff options
author | Thanos Apollo <[email protected]> | 2023-08-18 16:14:39 +0300 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2023-08-18 16:14:39 +0300 |
commit | 2569efcc6aa157f99e528e8d9e492c4844799032 (patch) | |
tree | 467b6755e3ecfe50421b8526f7a5dba6c4c2d97e | |
parent | a6b10db1cb7e911582a8c759b15b8691be515fdd (diff) |
Rewrite yeetube-mpv-toggle-video
-rw-r--r-- | yeetube.el | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -258,11 +258,13 @@ Example Usage: "Send KEY to mpv process." (interactive "sKeypress: ") (process-send-string "yeetube" key)) + +(defun yeetube-mpv-toggle-video () "Toggle video on/off mpv." (interactive) - (unless (string-match "mpv" yeetube-player) - (error "Not using mpv as yeetube-player")) - (yeetube--send-command 'cycle 'video)) + (process-send-string "yeetube" "_") + (message "yeetube: toggle video")) + ;; Usually titles from youtube get messed up, ;; This should fix some of the common issues. @@ -362,7 +364,8 @@ Example Usage: (view-count (buffer-substring (+ view-count-start 3) (- view-count-end 1)))) - ;; Don't remove this! + ;; Don't remove this! It'll make it easier to scrape more + ;; info in the future (search-backward "videoid") ;; show livestreams views as nil (if (string-match-p "text" view-count) |