emms-help
[Top][All Lists]
Advanced

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

Re: emms-player-mpv-update-metadata


From: Mike Kazantsev
Subject: Re: emms-player-mpv-update-metadata
Date: Sun, 25 Jul 2021 03:30:46 +0500

On Sat, 24 Jul 2021 10:00:58 -0400
Yoni Rabkin <yoni@rabkins.net> wrote:

> > Which is supposed to be customizable interactively via the usual
> > "customize" or "customize-group emms-player-mpv" interactive commands.
> >
> > I set it via:
> >   (custom-set-variables '(emms-player-mpv-update-metadata t t))
> >
> > And it should obey all the usual rules wrt customizable vars in emacs.  
> 
> I'll add that under the "Streaming Audio" section of the manual. Thanks.

Correction - there's simplier way to do it for a single value:

  (customize-set-variable 'emms-player-mpv-update-metadata t)

Option applies to non-streams as well of course, and guess can be
useful for a whole-album-in-one-file.flac + .cue arrangements too.

(though in that latter case, feel like there should also be a hook
that'd restore original (pre-mpv) tags after track is switched away
from, as otherwise it'd be stuck with a set of tags from the middle)


> > But trying interactive customize just now myself, found that
> > "emms-player-mpv" group might be missing (defgroup ...) definition
> > and signals error on rendering its two values with :set handler.
> >
> > Not sure why latter happens - pretty sure it used to work, 
> > will need to look into it a bit later.
> > Might be related to lexical binding change or changes in emacs.  
> 
> Other players get their customize menu via the
> `define-emms-simple-player' macro. Nothing good comes of `customize'
> (one of my least favorite Emacs features), but I guess we need to fix it.

Fixed in d27a921, looks like "set-default-toplevel-value" in :set on
these was implicit or maybe was set in my configuration otherwise somehow,
so didn't cause widget errors.

Also found that :group was implicit from :prefix spec in defgroup,
so cleaned these up.

Everything there should work as expected now, I think.


Don't really use interactive customize myself either.

It seem to be useful standard for exposing public parameters,
restricting their types/ranges/etc - and might be better than just
naming conventions, but yeah, for emacs users, maybe one func like

  (emms-player-mpv-configure
    :command "mpv"
    :update-duration t
    :update-metadata t
    <any-other-keyword-parameters>) 

would be much simplier, with all internal type/range checks and all
parameters defined/documented/implemented in one place.


-- 
Mike Kazantsev // fraggod.net



reply via email to

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