[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [S.P.Tseng] Re: [Emms-patches] [PATCH] let emms-player-mpd support
From: |
Michael Olson |
Subject: |
Re: [S.P.Tseng] Re: [Emms-patches] [PATCH] let emms-player-mpd support single track repeat. |
Date: |
Mon, 31 Aug 2009 14:42:47 -0700 |
> From: S.P.Tseng <address@hidden>
>
> Michael Olson <address@hidden> writes:
>
>> Can you refactor this in such a way that this new functionality is
>> implemented in emms-player-mpd.el, instead of emms.el?
>
> The function `emms-toggle-repeat-track' do nothing except change variable
> `emms-repeat-track'. If don't redefine emms-toggle-repeat-track, it difficult
> to find a way to inform mpd the repeat-track mode on or off.
I'm talking about this patch hunk here:
>>> + (when (equal (emms-player-for
>>> + (emms-playlist-current-selected-track)) 'emms-player-mpd)
>>> + (emms-player-mpd-send
>>> + (concat "single " (if emms-repeat-track "1" "0"))
>>> + nil #'ignore))
That doesn't belong in emms.el, because we do not want mentions of
emms-player-mpd there. It's supposed to be generic. So this most
likely belongs in emms-player-mpd.el's start functions. If there's no
way to get it there, make a new call to emms-player-get-player called
'pre-start, or something to that effect.
> And my patch have another problem. When mpd play the song once again in single
> mode. emms-player-mpd can not detect it, and as a result, the lyric will not
> reset. I even have not found out how emms-player-mpd detect next song event.
See emms-player-mpd-detect-song-change-1. It's a bit hairy.
> By The Way, recently emms-cache-set-from-mpd-all can not set the emacs-cache
> correctly.
Can you elaborate?
--
Michael Olson || http://mwolson.org/
Projects: Emacs, Muse, ERC, EMMS