ytdious
ytdious copied to clipboard
Improve kill-ring management
- Use delete-region instead of kill-region, so kill-ring doesn't get flooded with all the titles when next-line or previous-line is called.
- Create copy-url-at-point, which puts the url of the video in the clipboard. (bound to w by default)
- remove example in README because it was using functions from ytel.
Suggestion : It would be good to update invidious.org to another healthy instance by default.
Sorry didn't notice the pull request, I look over it.
I don't really get why the example is useless, as Example I use following code:
(defun ytdious-emms-append ()
"Add video at point in emms."
(interactive)
(let* ((video (ytdious-get-current-video))
(id (ytdious-video-id-fun video))
(title (assoc-default 'title video)))
(emms-add-url (format "%s/watch?v=%s"
ytdious-invidious-api-url
id))
(save-current-buffer
(set-buffer "Emms Streams")
(goto-char (buffer-end 1))
(beginning-of-line)
(forward-line -1)
(emms-set-title title))
(message title)))
To fill a emms playlist with youtube videos including the video titles. I think the example is illustrating such implementations? I get it would be nice to maybe have that included into the the repos or maybe add a example folder with such examples instead of showing it in the main page, but I don't get why it should be removed without a replacement?
The emms is then setup with mpv to play it.
Or that to open the browser comments:
(defun ytdious-comment ()
"Jump to video comment at point in mpv."
(interactive)
(let* ((video (ytdious-get-current-video))
(id (ytdious-video-id-fun video)))
(browse-url (concat ytdious-invidious-api-url "/watch?v=" id "#comments"))))
Sure it would not be hard to show the comments in emacs but it's not there yet and this mechanism still works? So maybe instead put in a example directory this snippets? and only mention it shortly in the docu? Is it confusing to have a to much Text in the Readme or what is the negative?