> From e0492b1543d52a9977a5c39a6432260149d0c85c Mon Sep 17 00:00:00 2001
> From: Julien Cubizolles <[email protected]>
> Date: Fri, 14 Oct 2016 23:50:16 +0200
> Subject: [PATCH 3/3] mplayer option to parse webradio playlists
>
> ---
>  lisp/emms-stream-info.el | 15 ++++++++++-----
>  lisp/emms-streams.el     |  5 +++--
>  2 files changed, 13 insertions(+), 7 deletions(-)
>
> diff --git a/lisp/emms-stream-info.el b/lisp/emms-stream-info.el
> index 8cf8195..cb26cc5 100644
> --- a/lisp/emms-stream-info.el
> +++ b/lisp/emms-stream-info.el
> @@ -57,13 +57,18 @@
>               (> (length (match-string-no-properties 1)) 0))
>         (setq ,symname (match-string-no-properties 1)))))
>  
> -(defun emms-stream-info-mplayer-backend (url)
> +(defun emms-stream-info-mplayer-backend (url type)
>    "Backend command for running mplayer on URL."
> +  (cond ((eq type 'streamlist)
> +      (setq urlcall "-playlist"))
> +    ((eq type 'url)
> +     (setq urlcall "")))

This should not be done like this, because you set a _global_ 'urlcall'
variable here.  If you want to have 'urlcall' local variable, you can
write it like this:

  (let ((urlcall (if (eq type 'streamlist)
                     "-playlist"
                   "")))
    ...)

>    (condition-case excep
>        (call-process "mplayer" nil t nil
>                   "-cache" "256"
>                   "-endpos" "0" "-vo" "null" "-ao" "null"
>                   "-msglevel" "all=-1:network=4:demuxer=4"
> +                 urlcall
                    (if (eq type 'streamlist) "-playlist" "")
                    ^^^^^^^^^
or even just put this line here directly instead of making 'urlcall'
variable.

-- 
Alex

_______________________________________________
Emms-help mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/emms-help

Reply via email to