* Add manpage generation.
* Hide xtask compilation info.
This changes the default behavior of the `cargo run` command for xtasks
to hide the compilation info. This makes sense as xtask's are run as a
program, and showing the compilation info every time clutters stdout
with unrelated info.
* Move ncspot's `clap::Command` to `lib.rs`.
Moving the `clap::Command` used internally by ncspot to a library allows
it to be easily shared between different packages (xtask and ncspot
itself).
This commit also reworks the xtasks to use clap for parsing the xtask
arguments, which simplifies writing new xtasks.
* Make `generate-manpage` `--output` optional.
When more xtasks get added, it would make sense to have a `generate-all`
subcommand that executes all xtasks, which wouldn't be able to have
options for every separate subcommand. Therefore the `output` argument
should be optional, and by default output to the `misc` directory which
contains extra metadata files already.
* Add packaging info to `README.md`.
Update the README to include information for packagers. The information
includes provided files as well as info on how to generate some of them.
Autojump seems to take precedence over regular keys, which isn't the
wanted behavior, especially when there are playlists in the list that
contain some of the most common Vim keybindings. For example when there
is a playlist called 'jazz', pressing `j` will jump to that playlist
instead of going down.
This commit disables autojump for now. If search inside the add to
playlist dialog would be a wanted feature, it could be implemented using
the default Vim search button `/` which would work the same way as
searching in other lists works right now.
Some basic cleanup of function signatures that took ownership of their
parameters, even though they didn't need ownership. Switching over the
usage of `Arc` to a normal borrow has the added benefit of cleaning up
the code a bit since now a reference can be given instead of having to
clone the values. The other benefit is that a lot of clones aren't
necessary anymore. It's not going to have noticable performance
benefits, but it is still a good thing to have less clones all over the
code.
* config / authentication: permit to call external program for getting credentials
You can add into your ncspot/config.toml like this:
```
creds_username = "mylogin"
creds_passeval = "pass my_pass_path_to_spot_password"
```
Or using any password manager who send your password.to stdout.
If a newline is detected it will be automatically removed
* Move credential commands into separate structure
Also add an option for a username command
* Document credential commands
---------
Co-authored-by: Henrik Friedrichsen <henrik@affekt.org>
* commands: Adding "disconnect" command to force socket shutdown
* Rename to `reconnect`
* Add documentation to README
Related to: #628#1033
---------
Co-authored-by: Henrik Friedrichsen <henrik@affekt.org>
* Create IPC socket on UNIX platforms
Creates an IPC socket which remote programs/scripts can connect to. This
can be used to control ncspot or fetch the current playback status.
At the moment, only remote control is implemented. Next step is to send
the current player status as a JSON object.
Fixes#524
* Publish status changes to connected sockets
Whenever the playback mode (playing, paused, stopped) or the track changes, all
socket listeners will be notified.
Fixes#924, fixes#1019
* Document IPC feature
Passing IDs to rspotify still feels a little wonky with their `Id` changes
making use of `Cow`. Maybe it can be simplified on our end, but it's a start.
Fixes#844
See also:
https://github.com/ramsayleung/rspotify/pull/332
* fix(backtrace): Fix backtrace logging and stdout
- Add manual implementation for panic that logs backtrace to a file.
- Remove all manual output to stdout.
- Fix new clippy warnings from Rust 1.65.
* Update docs
Co-authored-by: Henrik Friedrichsen <henrik@affekt.org>
Like mentioned in the corresponding issue by ayushjaipuriyar, ncspot
would crash when the queue was empty, shuffled, and played. This commit
fixes that, together with some minor clippy fixes.
PlayTrackMenu was used before the refactor of the contextmenus. I forgot
to clean up the struct before making the commit since rustc didn't
complain. Just cleaning up my mistakes ;)
* Add save option to context menu of all possible ListItems
* Add play options to context menus
* Fix for playlists and tracks
* Move playback controls into main menu
Previously two vectors of categories were created. The pagination was set up to
store the newly fetched page in the `Vec` that was not displayed.
With this change newly fetched pages should correctly show up in the "Browse"
screen.
As reported in #939
Ever since albums were sorted the cache staleness detection stopped working as
the order of items plays into the check. Remove it as it currently doesn't
work. It also wasn't a very good check.
Instead of storing a separate copy of the view title.
Additionally, rename `ViewExt.set_title()` to `ViewExt.with_title()` as it
consumes `self` and returns ownership.
With af08a56 properly passing down relativized events we don't have to implement
to scrollbar dragging logic ourselves anymore, but can rely on the one in
cursive.
This also fixes#839
The previous behavior would select and open the last item if the user clicked a
row after the last item. This change prevents such a behavior as it can be
misleading.
Related to #840