diff options
author | Thanos Apollo <[email protected]> | 2023-08-01 11:30:10 +0300 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2023-08-01 11:30:10 +0300 |
commit | 69cc8503078eaa995a278ec56e59219005537bdf (patch) | |
tree | 0307e7b34590ea4789284be10137c9cb5d44766b | |
parent | 5b16321156f5b0708a3c2841cdd6715d52ce75f3 (diff) |
Add functions to remove saved videos
Add yeetube-remove-saved-video -> Select & Remove video
Add yeetube-remove-all-saved-videos -> set yeetube-saved-videos to nil
-rw-r--r-- | yeetube.el | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -162,6 +162,20 @@ It's recommended you keep it as the default value." (shell-command (format "pkill -9 -f %s" (shell-quote-argument yeetube-player)))) (call-process-shell-command (format "%s %s" yeetube-player (cdr (assoc video yeetube-saved-videos))) nil 0))) + +(defun yeetube-remove-saved-video () + "Select video to remove from saved videos." + (interactive) + (let ((video (completing-read "Select video: " yeetube-saved-videos nil t))) + (setq yeetube-saved-videos (remove (assoc video yeetube-saved-videos) yeetube-saved-videos)))) + +(defun yeetube-remove-all-saved-videos ( ) + "Clear yeetube saved." + (interactive) + (let ((clear-saved (y-or-n-p "Delete saved?"))) + (when clear-saved + (setq yeetube-saved-videos nil)))) + (defun yeetube-toggle-video-mpv () "Toggle video on/off for mpv player." (interactive) |