>>>>>> 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:
> (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))))
> Should I prepare a patch for this?
It doesn't look like it would break anything (famous last words). So
sure, please do.