First of all i really like moc.
I'm switching from musicpd cause it can only play file indexed in his own database.
I use the cmdline interface.
#1 I' can't find a way to know the state of controls (shuffle,repeat,autonext).
I think it could be added in the info option (mocp -i).
in file interface.c in function interface_cmdline_file_info with something like this:
curr_file.state = get_state ();
printf("State: ");
if (curr_file.state == STATE_STOP) printf("STOP");
else if (curr_file.state == STATE_PLAY) printf("PLAY");
else if (curr_file.state == STATE_PAUSE) printf("PAUSE");
char* opts [] = { "Shuffle", "Repeat", "AutoNext" } ;
for ( i = 0; i < 3; ++i)
{
send_int_to_srv (CMD_GET_OPTION);
send_str_to_srv (opts);
if ( get_data_int () )
printf(" - %s", opts);
}
printf("\n");
if (curr_file.state != STATE_STOP)
{
....
So, for example, instead of
State: PLAY
i get
State: PLAY - Shuffle - Autonext
#2 I can't connect to server from a different user.
user1:/$mocp -M commondir -S
user2:/$mocp -M commondir -p
don't work cause only user1 has write permission on the created socket file.
I added:
umask(0);
at the beginning of the program in main.c and it works, but there should be a smarter solution.
#3 I ripped my cd collection and often i would like to play directly a track without using next/prev commands. So it would be nice if in play option (mocp -p) would be possible to select which track to play (es. mocp -p 4).
Thanks!
Fulvio Benini