Commit Briefs

Omar Polo

monitor: fix reported event

rethink a bit which event are reported and when. - drop 'toggle' event as it's not useful; now 'amused toggle' will report the play/pause event. - replace 'flush' with 'load'. there's no real difference between a flush and an empty load. (also, less event the better) - some events (next/prev/jump) are reported earlier to avoid possible issues (when messing around with the playing queue we can end up in every possible state.) - report 'seek' only after it really happened (i.e. after the player process sent the new position.) There's still a possible race here (we can receive a previous IMSG_POS and think it's the reply to the seek) but it it's hard/impossible to work around. - drop 'restart'. we have 'seek' now which is better (and actually restart is implemented on top of seek.) - add 'seek' to the default list of events.


Omar Polo

initialize status_format early in the main()

otherwise we may leave it NULL (it's set only in ctl_status) and crash in print_status.


Omar Polo

allow to customize the output of amused status

This add a -f flag (that falls back to $AMUSED_STATUS_FORMAT) to control which field to print and in which order.



Omar Polo

add "seek" to monitor list of event


Omar Polo

reimplement `restart' on top of seek


Omar Polo

use (a modified version of) kristaps' oconfigure

see GitHub issue #1


Omar Polo

add seek subcommand


Omar Polo

mark ctl_* as static too


Omar Polo

sort commands


Omar Polo

add missing initializers

meh, just to please the compiler. Global variables are guaranteed to be zeroed so not specifying a value shouldn't matter, yet it complains.


Omar Polo

typo in 'repeat'


Omar Polo

print the duration and position


Omar Polo

don't loop indefinitely in ctl_connect

if the server fails to start for wathever reason, we end up looping in ctl_connect indefinitely as we try to spawn the deamon (that dies) and try to connect to it. Add an arbitrary maximum number of retries before giving up. Reported by sikmir in the GitHub issue #1, thanks!