From d3e1750563b3a152e489e39e801eaed748e9d0d8 Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Fri, 17 Jan 2025 03:38:18 +0200 Subject: Remove yeetube-get * Deprecated. --- yeetube.el | 32 +++++++++----------------------- 1 file changed, 9 insertions(+), 23 deletions(-) (limited to 'yeetube.el') diff --git a/yeetube.el b/yeetube.el index c311414..351f9aa 100644 --- a/yeetube.el +++ b/yeetube.el @@ -196,29 +196,15 @@ videos from.") (defvar yeetube--channel-id nil "Value of channel which `yeetube-channel-videos' used for.") -(defun yeetube-get (keyword) - "Retrieve KEYWORD value for entry at point. - -Retrieve keyword value for entry at point, from `yeetube-content', in -*yeetube* buffer. - -Keywords: -- :title -- :id -- :type -- :view-count -- :duration -- :channel" - (unless (keywordp keyword) - (error "Value `%s' is not a keyword" keyword)) - (cl-getf (tabulated-list-get-id) keyword)) - -(defun yeetube-get-url (id type) - "Get video or playlist url." - (format "%s%s" (if (eq type 'video) - yeetube-video-url - yeetube-playlist-url) - id)) +(defun yeetube-get-url (&optional id type) + "Get video or playlist url for entry ID, adjusted for TYPE." + (let* ((id (or id (tabulated-list-get-id))) + (entry (cadr (assoc id yeetube-content))) + (type (or type (aref entry (- (length entry) 1))))) + (format "%s%s" (if (eq type 'video) + yeetube-video-url + yeetube-playlist-url) + id))) ;;;###autoload (defun yeetube-play () -- cgit v1.2.3