opensubscriber
   Find in this group all groups
 
Unknown more information…

e : emms-help@gnu.org 1 January 2011 • 11:07PM -0500

Re: [emms-help] using rhythmbox generated playlists
by Dirk-Jan C. Binnema

REPLY TO AUTHOR
 
REPLY TO GROUP




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

  YR> Dirk-Jan C. Binnema <djcb.bulk@gmai...> writes:

  >> I'm trying to use some playlists (.pls) that are generated by Rhythmbox, using
  >> emms-add-pls-playlist. The songs are indeed added to the list, but then emms
  >> refuses to play them.
  >>
  >> Rhythmbox puts them in the .pls file like this:
  >>
  >> File10=file:///home/djcb/Music/nightingale/white_darkness/08.White%20Darkness.mp3
  >> 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 make
  >> 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))))
    (emms-source-playlist-pls-files)))
--8<---------------cut here---------------end--------------->8---

Should I prepare a patch for this?

Best wishes,
Dirk.

_______________________________________________
Emms-help mailing list
Emms-help@gnu....
http://lists.gnu.org/mailman/listinfo/emms-help

Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

Related Messages

opensubscriber is not affiliated with the authors of this message nor responsible for its content.