emms-help
[Top][All Lists]
Advanced

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

Re: [emms-help] using rhythmbox generated playlists


From: Yoni Rabkin
Subject: Re: [emms-help] using rhythmbox generated playlists
Date: Sat, 01 Jan 2011 10:18:56 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

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

>>>>>> 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, 
> 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))))
>     (emms-source-playlist-pls-files)))
>
> Should I prepare a patch for this?

It doesn't look like it would break anything (famous last words). So
sure, please do.

Thanks.

-- 
   "Cut your own wood and it will warm you twice"



reply via email to

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