From 449929b5734e34aaca226fe1475fd59a10023535 Mon Sep 17 00:00:00 2001 From: mousebot Date: Sat, 12 Feb 2022 10:53:58 +0100 Subject: add c-ret binding to author-byline help echo --- lisp/mastodon-tl.el | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'lisp/mastodon-tl.el') diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el index 3b3b692..cfab15d 100644 --- a/lisp/mastodon-tl.el +++ b/lisp/mastodon-tl.el @@ -120,8 +120,7 @@ If nil `(point-min)' is used instead.") (defun mastodon-tl--get-media-types (toot) "Return a list of the media attachment types of the TOOT at point." - (let* (;(toot (mastodon-tl--property 'toot-json)) - (medias (or (alist-get 'media_attachments + (let* ((medias (or (alist-get 'media_attachments (alist-get 'reblog toot)) (alist-get 'media_attachments toot)))) (mapcar (lambda (x) @@ -350,8 +349,12 @@ i.e. where `mastodon-tl--goto-next-toot' leaves point." (alist-get 'replies_count toot-to-count))) (format-media (when media-types (format " | media: %s" - (mapconcat #'identity media-types " "))))) - (format "%s" (concat format-faves format-media)))) + (mapconcat #'identity media-types " ")))) + (format-media-binding (when (or + (member "video" media-types) + (member "gifv" media-types)) + (format " | C-RET to view with mpv")))) + (format "%s" (concat format-faves format-media format-media-binding)))) (defun mastodon-tl--get-attachments-for-byline (toot) "Return a list of attachment URLs and types for TOOT." -- cgit v1.2.3