From 78e2283f16dc2cebcd80f8e77d5e26ad0a898642 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Tue, 21 Jul 2026 06:47:02 -0500 Subject: refactor(elfeed): remove dead cj/extract-stream-url No production caller existed, and the v binding already plays entries through mpv, which resolves YouTube pages via its own yt-dlp hook internally, so the manual stream-URL extraction was fully superseded. Its tests go with it; the process-entries coverage stays. --- modules/elfeed-config.el | 24 ------------------------ 1 file changed, 24 deletions(-) (limited to 'modules') diff --git a/modules/elfeed-config.el b/modules/elfeed-config.el index dbc7e4a4..f4feef3a 100644 --- a/modules/elfeed-config.el +++ b/modules/elfeed-config.el @@ -142,30 +142,6 @@ (elfeed-search-update--force) (goto-char (point-min))) -;; ----------------------------- Extract Stream URL ---------------------------- -;; TASK: Is this method reused anywhere here or in another file? - -(defun cj/extract-stream-url (url format) - "Extract the direct stream URL from URL using yt-dlp with FORMAT. -Returns the stream URL or nil on failure." - (unless (executable-find "yt-dlp") - (error "The program yt-dlp is not installed or not in PATH")) - (let* ((format-args (if format - (list "-f" format) - nil)) - (cmd-args (append '("yt-dlp" "-q" "-g") - format-args - (list url))) - (output (with-temp-buffer - (let ((exit-code (apply #'call-process - (car cmd-args) nil t nil - (cdr cmd-args)))) - (if (zerop exit-code) - (string-trim (buffer-string)) - nil))))) - (when (and output (string-match-p "^https?://" output)) - output))) - ;; -------------------------- Elfeed Core Processing --------------------------- (defun cj/elfeed-process-entries (action-fn action-name &optional skip-error-handling) -- cgit v1.2.3