emms-help
[Top][All Lists]
Advanced

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

Re: [emms-help] emms-stream-info-bookmark doesn't get any results


From: Alex Kost
Subject: Re: [emms-help] emms-stream-info-bookmark doesn't get any results
Date: Fri, 21 Oct 2016 22:29:53 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.95 (gnu/linux)

> From e0492b1543d52a9977a5c39a6432260149d0c85c Mon Sep 17 00:00:00 2001
> From: Julien Cubizolles <address@hidden>
> 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



reply via email to

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