Dirk-Jan C. Binnema | 1 Jan 2011 13:43
Picon

using rhythmbox generated playlists

Hi all,

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?

Thanks in advance,
Dirk.

--

-- 
Dirk-Jan C. Binnema                  Helsinki, Finland
e:djcb <at> djcbsoftware.nl           w:www.djcbsoftware.nl
pgp: D09C E664 897D 7D39 5047 A178 E96A C7A1 017D DA3C

Yoni Rabkin | 1 Jan 2011 15:21

Re: using rhythmbox generated playlists

Dirk-Jan C. Binnema <djcb.bulk <at> gmail.com> writes:

> Hi all,
>
> 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?

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

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

--

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

Dirk-Jan C. Binnema | 1 Jan 2011 16:07
Picon

Re: using rhythmbox generated playlists

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

  YR> Dirk-Jan C. Binnema <djcb.bulk <at> gmail.com> 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)
(Continue reading)

Yoni Rabkin | 1 Jan 2011 16:18

Re: using rhythmbox generated playlists

Dirk-Jan C. Binnema <djcb.bulk <at> gmail.com> writes:

>>>>>> On Sat, 01 Jan 2011 09:21:20 -0500, Yoni Rabkin ("YR") wrote:
>
>   YR> Dirk-Jan C. Binnema <djcb.bulk <at> gmail.com> 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)
(Continue reading)


Gmane