diff options
author | Thanos Apollo <[email protected]> | 2023-08-01 11:28:31 +0300 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2023-08-01 11:28:31 +0300 |
commit | 3abe63d17d42e143b55c3dae350f080262655cbe (patch) | |
tree | b412a6cb3dbc83e587ea00424732916c0df14cbc | |
parent | 266cd4205a393dbc9238222f8197e5d3a5938a99 (diff) |
Add yeetube-save-video (New Feature)
-rw-r--r-- | yeetube.el | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -145,12 +145,13 @@ It's recommended you keep it as the default value." (message "Opening with %s" yeetube-player)) (push url yeetube--history))) -(defun yeetube-clear-history ( ) - "Clear yeetube history." +(defun yeetube-save-video () + "Save url at point." (interactive) - (let ((clear-history (y-or-n-p "Delete history?"))) - (when clear-history - (setq yeetube--history nil)))) + (let ((name (read-string "Save as: ")) + (url (org-element-property + :raw-link (org-element-context)))) + (push (cons name url) yeetube-saved-videos))) (defun yeetube-toggle-video-mpv () "Toggle video on/off for mpv player." |