Commits
- Commit:
58b2f322e4e3360e8d7e1fd892842d891fdba186
- From:
- Omar Polo <op@omarpolo.com>
- Date:
skip every non-regular file
not only directories... I guess we can't do much even with sockets,
fifos or character devices. (symbolic links are still supported since
we follow them)
- Commit:
ebdc0a24f14a77c01c20f3c8f7d106dc2f0ee410
- From:
- Omar Polo <op@omarpolo.com>
- Date:
drop unnecessary temp variable in main_restart_track
- Commit:
e06ad444a2ebf4c3ef8c41c6f4fa74f358f205be
- From:
- Omar Polo <op@omarpolo.com>
- Date:
avoid unnecessary initialization
we're just gonna memcpy all over path again a couple of lines before; a
smart compiler will probably ignore the initialization anyway.
- Commit:
5d86bc14239778053daa5c38c13f2a5c7d63a24c
- From:
- Omar Polo <op@omarpolo.com>
- Date:
simplify main_send_player: data is always NULL
- Commit:
a975dca965d92cd6af18a82629b597668e1d69d8
- From:
- Omar Polo <op@omarpolo.com>
- Date:
don't send the song' path to the player process
we're not relying anymore on the file extension, so this information is
useless for the player.
- Commit:
75da56db9b3ec4e213f7b279635feb44fda3cc29
- From:
- Omar Polo <op@omarpolo.com>
- Date:
reuse main_send_player
instead of filling the params for imsg_compose_event.
- 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.