mpc:
I've been wanting to improve mpc's options (add host/port, add short
options...).  Max recommended using getopt (and getopt_long if available).
Implementing getopt_long is simple enough, and everything is shiny.
Unfortunately, if getopt_long is unavailable, we still need to parse the
long options that have been around a while (--format, --no-status) so we'll
have to do manual parsing anyway.  In this case, is there any point in using
getopt?  Extending the current long-only parser to include short options
won't add a whole ton of code, and it'd be great for scripting to be able to
use "mpc -q" instead of "mpc --no-status", so seems worth it to me.

mpd commands:
>From ncmpc's recent visual selection addition, I noticed that moving a large
block of songs is quite slow because it has to send a command for every song
in the block.  I was going to have it simply move the neighboring song
instead, but it currently uses swapid instead of moveid... which led me to
notice:  moveid actually uses a songid and a playlist index, instead of two
songids like the documentation says.  Of course, moveid has been this way
since its second-to-initial commit in 2004, so I assume it will stay this
way and the documentation updated.  I'll submit a bug report for this later
(patch will be pretty trivial).
Anyway, I figure a moverange command is a reasonable thing to have within
mpd.  I've written and tested the queue_move_range function which will be
behind it, but haven't dealt with the command parsing side yet.  I figure it
should (like shuffle_range) use the same command, e.g. "move start:end to."
That'd mean that the id form would be "moveid  start-id:end-id  to-index".
I'm not too clear on the reason for using the index for the second argument,
though, so I wanted to make sure.

Jeffrey
------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Musicpd-dev-team mailing list
Musicpd-dev-team@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team

Reply via email to