aboutsummaryrefslogtreecommitdiffstats
path: root/yeetube.el
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2023-10-14 13:56:01 +0300
committerThanos Apollo <[email protected]>2023-10-17 09:24:21 +0300
commit945f8970c2935da326125e30a6d9289dc98a2ddd (patch)
tree4f70699e7ae51a7e89d1d4929aa91c883328d5f1 /yeetube.el
parentc8175cb6977c5879392bf137f97cd4b8aae96b01 (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
Diffstat (limited to 'yeetube.el')
-rw-r--r--yeetube.el9
1 files changed, 5 insertions, 4 deletions
diff --git a/yeetube.el b/yeetube.el
index d6c44ed..5cd7a88 100644
--- a/yeetube.el
+++ b/yeetube.el
@@ -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."