Commits
- Commit:
6a1b899f33aadd9552190404f656163ebe34de34
- From:
- Omar Polo <op@omarpolo.com>
- Date:
no point in returning int from a __dead function
- Commit:
335fa83ad847d6b5b891ec166625907be664ab5d
- From:
- Omar Polo <op@omarpolo.com>
- Date:
drop now unused #include <sndio.h>
with the recent refactoring, sndio is only visible in player.c
- Commit:
5a4b30307238cd3830c084656fe79c1f00eebcde
- From:
- Omar Polo <op@omarpolo.com>
- Date:
drop functions prototypes private to player.c and move hdl there too
- Commit:
1d6739509f8059b45ef1c1eb4f06d4596fc46984
- From:
- Omar Polo <op@omarpolo.com>
- Date:
rework how the daemon is automatically spawned
The previous way introduce possible races if multiple `amused' instances
try to start the daemon.
The new approach is heavily lifted from how tmux does it, but with some
minor differences. If the initial connect fails we try to grab a lock
to safely execute the daemon only one time. In fact we try to connect
one more time even when we hold the lock because another instance can
grab the lock, start the daemon and release it between the failure of
connect and the first flock.
It also changes slightly how the program behaves and how the -d option
works. Now running `amused' without arguments is a synonym for `amused
status' and the -d option only works if no arguments were given and if
the daemon wasn't running.
- Commit:
0f5568cbed68c3c871f2ee9b4bbbe63490cc68b5
- From:
- Omar Polo <op@omarpolo.com>
- Date:
reuse main_senderr
- Commit:
dfe2ad9662a4763c47a79b3f907e4d33c6d3536d
- From:
- Omar Polo <op@omarpolo.com>
- Date:
don't crash when trying to play a directory
with pledge(sendfd) we can't send a fd that represents a directory,
so we have to check before and eventually skip.
- Commit:
0fe5e233e3def36c9af6a9c9008ff0fdcbfe15ec
- From:
- Omar Polo <op@omarpolo.com>
- Date:
stray newline
- Commit:
0be6c0b1527db99916ee74e3d879e9a8151ef5ad
- From:
- Omar Polo <op@omarpolo.com>
- Date:
always call playlist_dropcurrent after main_play_song failures
otherwise we keep garbage in the playing queue.
- Commit:
601093db002025f856a835250585bc4d136ea068
- From:
- Omar Polo <op@omarpolo.com>
- Date:
unify IMSG_ERR and IMSG_EOF handling
IMSG_ERR needs a playlist_dropcurrent(), but otherwise is just the same
as IMSG_EOF: the current song ended and we need to move forward. To
unify, set current_song to NULL in playlist_dropcurrent, which make
sense since right after it we're not playing anything.
- Commit:
62f00244bc474d2032c0a88990f3c78fd1564cc7
- From:
- Omar Polo <op@omarpolo.com>
- Date:
remove siginfo handling
was useful for debugging but now ther's the `status' command for it.
- Commit:
87f575c3c6293c5cdff2b424a9f182f1857248f3
- From:
- Omar Polo <op@omarpolo.com>
- Date:
add a monitor functionality
this pings all the "interesting" events to clients that issued a
IMSG_CTL_MONITOR, except to the one that generated such event.
- Commit:
d307e5a2ebf6d0c2f26028893988df0cd2b18e8a
- From:
- Omar Polo <op@omarpolo.com>
- Date:
drop AMUSED_VERSION and the undocumented -V flag
- Commit:
4439877917f4c738e32c2ce63a961c8930c101af
- From:
- Omar Polo <op@omarpolo.com>
- Date:
show repeat one/all status in `amused status' output
- Commit:
f3bd773be6486fa2c212ff27aee53e3894bcc51d
- From:
- Omar Polo <op@omarpolo.com>
- Date:
handle eof wrt repeat_one
- Commit:
74c987d53230b125b919cd1ab99426e6d81a8bbc
- From:
- Omar Polo <op@omarpolo.com>
- Date:
keep current song in a dedicated variable
playlist.songs[play_off] is not a good representation for the current
playing song after all. After a `load' command, or a flush request, the
play_off changes but we're still playing the "old" song.
This saves the current song in a dedicated variable that's updated upon
playlist_advance and playlist_previous, thus givin a more accurate view.