From ed7ee66de4ec950b530a5c696ca5b7de3cd12647 Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Wed, 23 Oct 2024 00:58:08 +0300 Subject: [fix] Adjust channel-id for channel-videos. --- yeetube.el | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'yeetube.el') 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)))) -- cgit v1.2.3