diff options
author | Thanos Apollo <[email protected]> | 2023-08-17 05:46:01 +0300 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2023-08-17 05:46:01 +0300 |
commit | 9e2e7454c0d2238cf8a09f07495c9f9a62824abd (patch) | |
tree | add200972f23feb3eedf49e57bd176ec1788a4e4 | |
parent | 4161551d80c1c74ca9b29d1a15ca80e0328a4aa5 (diff) |
yeetube-create-buffer: Adjust with view-count
-rw-r--r-- | yeetube.el | 16 |
1 files changed, 11 insertions, 5 deletions
@@ -261,12 +261,18 @@ It's recommended you keep it as the default value." (org-mode) (insert (format "searching: %s\nfor: %s \n* Search Results: \n \n" yeetube-query-url query)) - (dolist (pair (reverse content)) - (let ((videoid (car pair)) - (title (yeetube-fix-title (cadr pair)))) + (dolist (info (reverse content)) + (let ((videoid (car info)) + (title (yeetube-fix-title (cadr info))) + (view-count (caddr info))) ;; gap [%s ] for titles that end with ] - (insert (format "%s [[%s/watch?v=%s][%s ]]\n" - yeetube-results-prefix yeetube-query-url videoid title)))) + (if yeetube-display-view-count + (insert (format "%s [[%s/watch?v=%s][%s ]] =%s=\n" + yeetube-results-prefix yeetube-query-url + videoid title view-count)) + (insert (format "%s [[%s/watch?v=%s][%s ]]\n" + yeetube-results-prefix yeetube-query-url + videoid title))))) (yeetube-insert-info) (setq buffer-read-only t) (goto-char (point-min)) |