Giter VIP home page Giter VIP logo

mp-cli's People

Contributors

dependabot[bot] avatar johnallen3d avatar release-tokens-johnallen3d[bot] avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

aditya94139

mp-cli's Issues

Rename!

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.

Auto generate help doc

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.

Handle volume down cleanly

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.

Implement more commands

Consider becoming fully compatible with mpc.

  • [default] or status
  • add <uri>
  • crop
  • current
  • del <position>
  • play [<position>]
  • next
  • prev
  • pause
  • pause-if-playing
  • toggle
  • cdprev
  • stop
  • seek [+-][HH:MM:SS]|<0-100>%
  • seekthrough [+-][HH:MM:SS]
  • clear
  • outputs
  • enable [only] <output # or name> [...]
  • disable [only] <output # or name> [...]
  • toggleoutput <output # or name> [...]
  • outputset <output # or name> <name>=<value>
  • queued
  • shuffle
  • move <from> <to>
  • playlist [<playlist>]
  • listall [<file>]
  • ls [<directory>]
  • lsplaylists
  • load <file>
  • insert <uri>
  • prio <prio> <position/range> ...
  • save <file>
  • rm <file>
  • volume [+-]<num>
  • repeat <on|off>
  • random <on|off>
  • single <on|once|off>
  • consume <on|off>
  • search <type> <query>
  • searchadd <type> <query>
  • find <type> <query>
  • findadd <type> <query>
  • searchplay <pattern>
  • list <type> [<type> <query>]
  • crossfade [<seconds>]
  • clearerror
  • mixrampdb [<dB>]
  • mixrampdelay [<seconds>]
  • update [<path>]
  • rescan [<path>]
  • sticker <uri> <get|set|list|delete|find> [args..]
  • stats
  • version
  • idle [events]
  • idleloop [events]
  • replaygain [off|track|album]
  • channels
  • sendmessage <channel> <message>
  • waitmessage <channel>
  • subscribe <channel>
  • listneighbors
  • mount [<mount-path> <storage-uri>]
  • unmount <mount-path>
  • albumart <uri>
  • readpicture <uri>

Consider changes to `OutputFormat`

  1. can this be optional - with a sensible default
  2. maybe a new variant for None - not to be confused with std::Option::None, simply no output (eg. --quiet)

Complete `list` command

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

Setup crate release

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?

Status updates

  • running just mpc returns the status, mp-cli should do the same
  • add the following values to output
    • current track position in playlist
    • total track count in playlist
    • current track position (MM:ss)
    • current track duration (MM:ss)
    • current track percent complete

Download release version

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).

Separate `lib` crate

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?

  • continue to publish cli binaries to GitHub Releases (mp-cli)
  • publish "wrapper crate" to crates.io (mpd-easy)

Expose file path

It may be helpful for integrations to have access to the absolute path to the current song file.

Default to JSON format

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 ?"
}

Fix `cd` script

The cd action has not activated on the last two releases.

Expose `music_directory`

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();

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.