emms-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Adding a description text property for a track


From: Yuchen Pei
Subject: Adding a description text property for a track
Date: Fri, 26 Nov 2021 11:27:46 +1100
User-agent: mu4e 1.4.13; emacs 27.2

Hello,

How about we add a description text property to tracks, something like the following in (defun emms-track-simple-description (track):

modified   emms.el
@@ -722,8 +722,10 @@ return the type and the name with a colon in between.
Hex-encoded characters in URLs are replaced by the decoded
character."
  (let ((type (emms-track-type track)))
-    (cond ((eq 'file type)
-           (emms-track-name track))
+    (cond ((emms-track-get track 'description)
+          (emms-track-get track 'description))
+         ((eq 'file type)
+          (emms-track-name track))
          ((eq 'url type)
           (emms-format-url-track-name (emms-track-name track)))
          (t (concat (symbol-name type)

The reason I'm proposing this is that:

1. In my only usage of emms of playing urls over http / youtube-dl / sftp, I can't seem to get any descriptions of any tracks for display. 2. It could be used for caching descriptions and reducing work required to load native playlists.

WDYT?

On a side note, it would also be nice to have a description function that feeds back the media title obtained by media players like mpv, which could fix some of the description problems like youtube-dl.

--
Best,
Yuchen

PGP Key: 47F9 D050 1E11 8879 9040  4941 2126 7E93 EF86 DFD0
          <https://ypei.me/assets/ypei-pubkey.txt>

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]