Commits
- Commit:
d903ec9aae187a608670f040d40a89ca1fed243a
- From:
- Omar Polo <op@omarpolo.com>
- Date:
drop a local variable
don't need to keep `files' around, res->files is enough. it would have
prevented the previous bug (probably.)
- Commit:
a185ed1ea0aa9e48c5cc2708ee45ef4c80bd4277
- From:
- Omar Polo <op@omarpolo.com>
- Date:
fix `amused add' failure introduced in previous commit
don't advance the files pointer, we need the original pointer when
receiving the replies.
- Commit:
fad0fb69c1b7616f933c497887967078ff4dd111
- From:
- Omar Polo <op@omarpolo.com>
- Date:
refactor: group imsg handling
the approach with one-function-per-imsg leads to too much code
splatted across the file.
- Commit:
90122a37e6f55f08fd979f7b07ba20a49952faf8
- From:
- Omar Polo <op@omarpolo.com>
- Date:
amused monitor: allow to pass a list of event as filter
it's easier / simpler for scripts to do
$ amused monitor next,prev,jump
rather than
$ amused monitor | egrep --line-buffered 'next|prev|jump'
- Commit:
d51201063dfd08d55382bc1848cee7f4662f504b
- From:
- Omar Polo <op@omarpolo.com>
- Date:
add back missing memzero
- Commit:
1dd3b054dd3d8778debf24bb32cc61ff06e3ee42
- From:
- Omar Polo <op@omarpolo.com>
- Date:
use a more readable strncmp to look for prefixes
also while here stick an `else' before the second clausole. We're
supposed to trim out only '> ' and ' ', but the missing else would
also trim out ' ' after a '> '!
- Commit:
c00c1428ccaedc2d63d9d489c00d796d5718f615
- From:
- Omar Polo <op@omarpolo.com>
- Date:
get rid of realpath during load
it has a non-ignorable cost over NFS (sdk@ reported ~30 seconds to load
64k songs, and up to 5 minutes over wifi!) and don't provide us any real
gain: files can still vanish after being imported or may appear later.
The only advantage of realpath was that it would clean up the path from
segments like "/./" and resolve the ".." components, but that's a minor
issue anyway.
prodded by, discussed with and tested by sdk@, thanks a lot!
- 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:
acaf7eb251046be1f73077acf6519aa7496fa0a4
- From:
- Omar Polo <op@omarpolo.com>
- Date:
fix argc check
argc can be -1 if we called noarg with argc=0, because optind is 1.
- Commit:
7e29fc4a3e7217cea06735afda36eac20159ae18
- From:
- Omar Polo <op@omarpolo.com>
- Date:
correctly handle arguments for sub-commands
things like "--" should be skipped etc, easier to rely on getopt(3).
- Commit:
f44b3c4e5f075af1be265b896f3fcb320c831ad8
- From:
- Omar Polo <op@omarpolo.com>
- Date:
output the two repeat bits in two different lines
- Commit:
54f55296abf2a40f2c21a89e621ef7af59515b32
- From:
- Omar Polo <op@omarpolo.com>
- Date:
ctl_noarg: allow argv == 0 for the implicit "status" case
- 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:
3af9396383944c20699d5340bd000f7a5dafb387
- From:
- Omar Polo <op@omarpolo.com>
- Date:
keep the current song if load input was generated by show -p
`amused show -p' generates a listing in the form of
song
> current song
song
...
This adds an heuristic to `amused load' so that the current song can be
set if it's prefixed by "> ". It's particularly useful when
re-importing the state from a previous run.
- Commit:
8b51cceec56ee5c563e21573ad546b68a48feb43
- From:
- Omar Polo <op@omarpolo.com>
- Date:
flush stdout after each monitor event
otherwise the output may get buffered by a pipe and it's not pretty.