summaryrefslogtreecommitdiff
path: root/yeetube.el
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2024-10-23 00:58:08 +0300
committerThanos Apollo <[email protected]>2024-10-23 00:58:08 +0300
commited7ee66de4ec950b530a5c696ca5b7de3cd12647 (patch)
tree12adc1e1b787b232a019aa1202e2ea23e871182e /yeetube.el
parentf73172433a944551558204554efae0e441388034 (diff)
[fix] Adjust channel-id for channel-videos.
Diffstat (limited to 'yeetube.el')
-rw-r--r--yeetube.el5
1 files changed, 5 insertions, 0 deletions
diff --git a/yeetube.el b/yeetube.el
index a8588f6..9f90c2d 100644
--- a/yeetube.el
+++ b/yeetube.el
@@ -193,6 +193,9 @@ You can change this value to an invidious instance. Although yeetube
will still query youtube, `yeetube-play' will use the above url to play
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.
@@ -415,6 +418,7 @@ Image is inserted in BUFFER for ENTRY."
(defun yeetube-channel-videos (&optional channel-id)
"View videos for the channel with CHANNEL-ID."
(interactive (list (or (yeetube-channel-id-at-point) (format "@%s" (read-string "Channel: ")))))
+ (setf yeetube--channel-id (substring channel-id 2))
(yeetube-display-content-from-url (format "https://youtube.com/%s/videos" channel-id)))
(defun yeetube-channel-search (channel-id query)
@@ -499,6 +503,7 @@ Image is inserted in BUFFER for ENTRY."
(thumbnail (yeetube--scrape-string pos "thumbnail" "url"))
(date (when videop (yeetube--scrape-string pos "publishedTimeText" "simpleText")))
(entry nil))
+ (when (string= channel title) (setf channel yeetube--channel-id))
(setq thumbnail (string-replace
"hq720" "default"
(substring thumbnail 0 (string-search "?" thumbnail))))