ambrevar/file: Add `tags'.

master
Pierre Neidhardt 2021-01-22 21:16:53 +01:00
parent 38a8b40df2
commit 6153c55c12
2 changed files with 9 additions and 0 deletions

View File

@ -9,6 +9,8 @@
(trivial-package-local-nicknames:add-package-local-nickname :alex :alexandria)
(trivial-package-local-nicknames:add-package-local-nickname :sera :serapeum))
;; TODO: Add helper to print list of objects / structs / plist / alist to an Emacs tabulated-mode buffer.
(export-always 'with-emacs-eval)
(defmacro with-emacs-eval (&body body)
"Evaluate BODY (s-expressions) with `emacsclient'.

View File

@ -15,6 +15,8 @@
;; TODO: Only expose readers for slots that cannot be modified, such as `path'.
;; TODO: Implement disk-usage for directories.
(sera:eval-always
(defun name-identity (name definition)
(declare (ignore definition))
@ -372,3 +374,8 @@ See `%description'."
(ambrevar/ffprobe:height
(find-if #'plusp (media-streams file)
:key #'ambrevar/ffprobe:height)))
(export-always 'tags)
(defmethod tags ((file mediafile))
;; TODO: Get tags from streams too?
(ambrevar/ffprobe:tags (media-format file)))