johnallen3d / mp-cli Goto Github PK
View Code? Open in Web Editor NEWA Music Player Daemon (MPD) CLI client implemented in Rust.
License: Apache License 2.0
A Music Player Daemon (MPD) CLI client implemented in Rust.
License: Apache License 2.0
We're failing when uploading binaries, missed one rename! 🤦♂️
https://github.com/johnallen3d/mp-cli/actions/runs/6209479050/job/16856733106
mpd
was updated to include a third option for the single
mode called once
. This change was later added to mpc
but has not yet been reflected in rust-mpd
.
This breaks compatibility (via addition) with mpc status
but can be useful in display.
I searched GitHub for mpc-rs
before naming the repo but I failed to search crates.io and GitLab. Turns out mpc-rs
crate already exists (but appears to be a little different in aim). Let's rename this one and move on.
Currently, we have the full help in the README. This is not desirable because it's a manual step that has and will be forgotten. Let's look into auto-generating a docs/help.txt
file from CI.
Currently when trying to turn down the volume, clap
gets confused:
mpc-rs volume -10
Clap will see the -10
as a flag and not a value. The current workaround for this is to prefix the -10
with double-days (eg. --
).
mpc-rs volume -- -10
Gross! Not intuitive and breaks compatibility with mpc
.
We should be trying to discover the configured address and port from the mpd.conf
.
❯ tail -n2 ~/.config/mpd/mpd.conf
bind_to_address "127.0.0.1"
port "6600"
Consider becoming fully compatible with mpc
.
None
- not to be confused with std::Option::None
, simply no output (eg. --quiet
)According to mpc
docs and the mpd
crate the list
command should take an optional [<type> <query>]
. However, when I try to pass additional arguments (via mpc
) I never get results back. I must not be understanding the intent here.
❯ mpc search artist u2
U2/Achtung Baby/01 Zoo Station.m4a
U2/Achtung Baby/02 Even Better Than The Real Thing.m4a
U2/Achtung Baby/03 One.m4a
...
❯ mpc list album artist u2
Currently cd.yml
is set up to release binaries of the CLI (to GitHub Releases). Can we also setup releases of the lib
crate to crates.io?
mpc
returns the status, mp-cli
should do the sameBasically every function relies on an interaction with the mpd
server. Find a way to provide a fake?
Take a look at: https://github.com/kstep/rust-mpd/blob/main/tests/helpers/daemon.rs
To add:
From mpc
docs
add - Adds a song from the music database to the queue. Can also read input from pipes. Use “mpc add /” to add all files to the queue.
Add a note to the README about downloading from GitHub releases. Maybe a script that does it all for the user (eg. the dreaded curl
to sh
).
The methods on the Client
struct could be useful as a library (eg. a convenience wrapper around mpd
crate).
Can we migrate this project to a workspace?
mp-cli
)mpd-easy
)It may be helpful for integrations to have access to the absolute path to the current song file.
From mpc
help:
mpc play [<position>] Start playing at <position>
The text format probably will not seem intuitive to the average user.
❯ mp-cli status
volume=100
state=pause
artist=King Gizzard & The Lizard Wizard
title=Am I In Heaven ?
versus the JSON
❯ mp-cli --format json status | jq
{
"volume": "100",
"state": "pause",
"artist": "King Gizzard & The Lizard Wizard",
"title": "Am I In Heaven ?"
}
The cd
action has not activated on the last two releases.
It would be nice if the client exposed the music_directory
. I tried this recently and received an error from mpd-rs
or mpd
itself.
// TODO: this call (`music_directory`) is panicking. 😢
let music_dir = self.client.music_directory().unwrap();
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.