emms-help
[Top][All Lists]
Advanced

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

How to show the metadata when listening to audio streams?


From: Rodrigo Morales
Subject: How to show the metadata when listening to audio streams?
Date: Fri, 06 Aug 2021 18:20:57 -0500

* Table of contents

1. Prologue
2. The question

* Prologue

Consider the following minimal =init.el= file

#+BEGIN_SRC elisp
(require 'emms)
(require 'emms-player-mpv)
(require 'emms-streams)

(setq emms-player-list '(emms-player-mpv))
(setq emms-player-mpv-parameters '("--quiet" "--really-quiet" 
"--no-audio-display" "--force-window=no"))

(emms-streams-install)
#+END_SRC

If I use that configuration as my =init.el= file and then execute =M-x
emms-streams=. The buffer =Emms Streams= is opened containing the
following lines

#+BEGIN_EXAMPLE
streamlist: http://www.somafm.com/beatblender.pls
streamlist: http://www.somafm.com/secretagent.pls
streamlist: http://www.somafm.com/groovesalad.pls
streamlist: http://www.somafm.com/dronezone.pls
streamlist: http://www.somafm.com/tagstrance.pls
streamlist: http://www.somafm.com/indiepop.pls
streamlist: http://www.somafm.com/doomed.pls
http://listen.radionomy.com:80/-PHILOSOMATIKAPROGRESSIVE-
streamlist: http://www.bassdrive.com/BassDrive.m3u
streamlist: http://www.ibiblio.org/wcpe/wcpe.pls
streamlist: http://stream.nute.net/kohina/stream.ogg.m3u
streamlist: http://privat.is-by.us:8000/necta192.mp3.m3u
streamlist: http://nectarine.from-de.com/necta192.m3u
streamlist: http://www.wfmu.org/wfmu.pls
streamlist: http://wfmu.org/wfmu_rock.pls
streamlist: http://wfmu.org/wfmu_drummer.pls
streamlist: http://wfmu.org/wfmu_sheena.pls
streamlist: http://nyc01.egihosting.com:6232/listen.pls
streamlist: http://199.244.85.125:8000/wxhq1
#+END_EXAMPLE

Now, if I execute the following command (to get the information of the
track at point) in the first line (i.e. in the track =streamlist:
http://www.somafm.com/beatblender.pls=), the following is obtained

#+BEGIN_SRC emacs-lisp
(with-current-buffer "Emms Streams"
  (beginning-of-buffer)
    (emms-playlist-track-at (point)))
#+END_SRC

#+RESULTS:
#+BEGIN_EXAMPLE
(*track*
  (type . streamlist)
  (name . "http://www.somafm.com/beatblender.pls";)
  (metadata "SomaFM: Beatblender" "http://www.somafm.com/beatblender.pls"; 1 
streamlist))
#+END_EXAMPLE

=(emms-playlist-track-at (point))= is able to get the name of the stream
because the file =~/.config/emacs/emms/streams.emms= (which is created by
the function =emms-streams-install=) contains this metadata.

* The question

As I shown before in the #+BEGIN_EXAMPLE block, the URL is shown for
each stream in the "Emms Streams" buffer. I am now wondering how I can
show the name (which is stored in the metadata) for each stream in the
playlist buffer.

I would like to do this because I usually listen to audio streams
using EMMS and having a custom name for each stream would make the
playlist buffer more readable than having the URL.

-- 
[[[ If you see a signature in spanish below this message, please omit
it. It is automatically inserted in all my messages due to the internal
privacy policies of the organization that owns the domain of my email
address. ]]]

-- 
La información contenida en este e-mail y sus anexos es confidencial, 
privilegiada y está dirigida exclusivamente a su destinatario, en 
consecuencia, solo puede ser utilizada por aquel. Si usted no es el 
destinatario original, no deberá examinar, usar, copiar o distribuir este 
mensaje o la información que contiene. Si lo recibe por error, por favor 
reenvíelo a la persona que se lo envió y elimínelo. Cualquier retención o 
uso total o parcial no autorizada de este mensaje está estrictamente 
prohibida y sancionada por ley.



reply via email to

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