* MPRIS: Restructured existing implementation
My pr addresses some of the inconsistencies in ncspot's mpris
implementation. While the previous logic was technically good enough, it
was inflexible and reported redundant information.
This will make it easier for software, that processes mpris events in
some way, to accurately react to player updates.
- 'Metadata' and 'Playback' updates have been separated into there own
command
- Mpris commands are only emitted from within spotify.rs
- Some parts of the application creation logic has been
restructured to allow for mpris events to be emitted upon startup
- The initial song loading code has been moved from 'Queue::new'
into 'Application::new'.
* MPRIS: implemented most clippy suggestions
* Fix: applied clippy suggestions + format
* MPRIS: Renamed MprisCommands to be more resonable
I've added a clippy exception so it does not complain to us about enum
variants starting with the same prefix.
---------
Co-authored-by: haruInDisguise <--help>
ncspot is an ncurses Spotify client written in Rust using librespot. It is heavily inspired by ncurses MPD clients, such as ncmpc. My motivation was to provide a simple and resource friendly alternative to the official client as well as to support platforms that currently don't have a Spotify client, such as the *BSDs.
ncspot only works with a Spotify premium account as it offers features that are not available for free accounts.
Features
- Support for tracks, albums, playlists, genres, searching...
- Small resource footprint
- Support for a lot of platforms
- Vim keybindings out of the box
- IPC socket for remote control
- Automatic authentication using a password manager
Installation
ncspot is available on macOS (Homebrew), Windows (Scoop, WinGet), Linux (native package, Flathub and Snapcraft) and the BSD's. Detailed installation instructions for each platform can be found here.
Configuration
A configuration file can be provided. The default location is ~/.config/ncspot. Detailed
configuration information can be found here.
Building
Building ncspot requires a working Rust installation and
a Python 3 installation. To compile ncspot, run cargo build. For detailed instructions on building
ncspot, there is more information here.
Packaging
Information about provided files, how to generate some of them and current package status accross platforms can be found here.
