diff options
author | Thanos Apollo <[email protected]> | 2023-10-14 13:56:01 +0300 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2023-10-17 09:24:21 +0300 |
commit | 945f8970c2935da326125e30a6d9289dc98a2ddd (patch) | |
tree | 4f70699e7ae51a7e89d1d4929aa91c883328d5f1 | |
parent | c8175cb6977c5879392bf137f97cd4b8aae96b01 (diff) |
yeetube:(yeetube-get-url) Rewrite to use yeetube-get
Rewrite yeetube-get-url to use (yeetube-get :videoid), as well as
using yeetube-url variable instead of hardcoding youtube value
-rw-r--r-- | yeetube.el | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -104,16 +104,17 @@ You can change the value to an invidious instance.") video-info)) (defun yeetube-get-url () - "Get url for subject in *yeetube* buffer at point." - (let ((video-url (concat "https://youtube.com/watch?v=" - (cadr (nth (- (line-number-at-pos) 1) (reverse yeetube-content)))))) + "Get video url." + (let ((video-url (concat yeetube-url + (yeetube-get :videoid)))) video-url)) ;;;###autoload (defun yeetube-play () "Play video at point in *yeetube* buffer." (interactive) - (funcall yeetube-player (yeetube-get-url))) + (funcall yeetube-player (yeetube-get-url)) + (message "Playing: %s" (yeetube-get :title))) (defun yeetube-load-saved-videos () "Load saved videos." |