[Top][All Lists]

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

Re: [emms-help] using rhythmbox generated playlists

From: Dirk-Jan C . Binnema
Subject: Re: [emms-help] using rhythmbox generated playlists
Date: Sat, 01 Jan 2011 17:07:49 +0200
User-agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/24.0 Mule/6.0 (HANACHIRUSATO)

>>>>> On Sat, 01 Jan 2011 09:21:20 -0500, Yoni Rabkin ("YR") wrote:

  YR> Dirk-Jan C. Binnema <address@hidden> writes:

  >> I'm trying to use some playlists (.pls) that are generated by Rhythmbox, 
  >> emms-add-pls-playlist. The songs are indeed added to the list, but then 
  >> refuses to play them.
  >> Rhythmbox puts them in the .pls file like this:
  >> Title10=White Darkness
  >> And can make it to work if I remove the "file://"-prefix and decode the URL
  >> (i.e.. %20 => ' '). I guess it shouldn't be too hard to make emms do this
  >> automatically, but I'd like to ask where in the source code I could best 
  >> the change -- any hints?

  YR> Probably somewhere in emms/lisp/emms-source-playlist.el

  YR> We'd be happy for a patch once you work it out.

Thanks. I made it work by updating emms-source-playlist-parse-pls:

--8<---------------cut here---------------start------------->8---
(defun emms-source-playlist-parse-pls ()
  "Parse the pls playlist in the current buffer."
  (mapcar (lambda (file)
            (if (string-match "\\`http://\\|\\`mms://" file)
              (emms-track 'url file)
              (if (string-match "\\`file://" file)
                (let ((xfile (url-unhex-string (substring file 7))))
                  (emms-track 'file xfile))
                (emms-track 'file file))))
--8<---------------cut here---------------end--------------->8---

Should I prepare a patch for this?

Best wishes,

reply via email to

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