diff options
author | Thanos Apollo <[email protected]> | 2023-10-14 13:54:14 +0300 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2023-10-17 09:24:21 +0300 |
commit | c8175cb6977c5879392bf137f97cd4b8aae96b01 (patch) | |
tree | bf241841dbe58915d4d3647803f4151d276108fa | |
parent | 81d72a650564b719807aa16942145142d07d5fc0 (diff) |
yeetube: Add yeetube-get
yeetube-get function accepts a keyword argument. Retrieves information
for keyword from yeetube-content.
-rw-r--r-- | yeetube.el | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -94,6 +94,15 @@ Example Usage: "URL used to play videos from. You can change the value to an invidious instance.") + +(defun yeetube-get (keyword) + "Retrieve KEYWORD value from `yeetube-content'." + (unless (keywordp keyword) + (error "Value %s is not a keyword" keyword)) + (let ((video-info + (cl-getf (nth (- (line-number-at-pos) 1) (reverse yeetube-content)) keyword))) + video-info)) + (defun yeetube-get-url () "Get url for subject in *yeetube* buffer at point." (let ((video-url (concat "https://youtube.com/watch?v=" |