musicplayerdaemon / mpc Goto Github PK
View Code? Open in Web Editor NEWCommand-line client for MPD
License: GNU General Public License v2.0
Command-line client for MPD
License: GNU General Public License v2.0
Hello, I have lemonbar starting with openbox session, however command mpc current
never returns value, even if I have refreshing rate at 5s and music is playing.
EDIT: If I start it from command line it works just fine..
EDIT2: Arch Linux, latest kernel
$ meson . output
The Meson build system
Version: 0.47.2
Source dir: /data/src/mpc
Build dir: /data/src/mpc/output
Build type: native build
Project name: mpc
Project version: 0.31
Native C compiler: cc (gcc 8.2.0 "cc (Debian 8.2.0-4) 8.2.0")
Build machine cpu family: x86_64
Build machine cpu: x86_64
Checking for function "iconv" : YES
Configuring config.h using configuration
Compiler for C supports arguments -Wall: YES
Compiler for C supports arguments -Wextra: YES
Compiler for C supports arguments -Wno-deprecated-declarations -Wdeprecated-declarations: YES
Compiler for C supports arguments -Wmissing-prototypes: YES
Compiler for C supports arguments -Wshadow: YES
Compiler for C supports arguments -Wpointer-arith: YES
Compiler for C supports arguments -Wstrict-prototypes: YES
Compiler for C supports arguments -Wcast-qual: YES
Compiler for C supports arguments -Wwrite-strings: YES
Compiler for C supports arguments -fvisibility=hidden: YES
Found pkg-config: /usr/bin/pkg-config (0.29)
Native dependency libmpdclient found: YES 2.15
Program sphinx-build found: YES (/usr/bin/sphinx-build)
Build targets in project: 3
Found ninja-1.8.2 at /usr/bin/ninja
$ ninja -C output
ninja: Entering directory `output'
[22/22] Generating HTML documentation with a custom command.
WARNING: html_static_path entry u'/data/src/mpc/doc/_static' does not exist
something like mpc tagedit %id {metadata_to_edit} {new value}
e.g. mpc tagedit 207 genre "Jazz"
I'd do it for all the classic metadata you can use in "metadata_to_use" of mpd.conf
I want to start playing the current song from the beginning, but mpc seek 0
seeks to the next song most of the time. Sometimes it does what I want it to and seeks the current song to the start, but then sometimes it just doesn't start playing despite doing so before the command is run. Seems really inconsistent and all these three cases can occur with the same song.
To summarize, when I run mpc seek 0
while music is playing, the following three effects can be observed:
My OS is Arch Linux. mpd version is 0.20.18 and mpc version is 0.29.
It would be very useful to have the ability ask mpd for a random track matches a query, something like this, although perhaps not the best syntax, just an example.
mpc search '( (genre == "Rock") AND (random) )'
Which would return one random song that is of the Rock genre, or of course could be combined with any other queries that search/find can use.
When I use mpc 0.28 + libmpdclient 2.11 everything works correctly,
but when I update libmpdclient to 2.12, mpc shows error message on every command, eg:
$ mpc -h 192.168.122.1 toggle
mpd error: Operation now in progress
Noticed this when writing some scripts.
So when i clear the mpd playlist and load a new playlist the track IDs get added.
Example:
mpc playlist -f "[%id% - %artist% - %title%]" | head -5
1 - Amethystium - Autumn Interlude
2 - Amethystium - Treasure
3 - Andy McKee - Ebon Coast
4 - Ayume - Hana (Chillout Version)
5 - Blank & Jones - Chilled Cream
mpc clear
mpc load Chill
mpc playlist -f "[%id% - %artist% - %title%]" | head -5
29 - Amethystium - Autumn Interlude
30 - Amethystium - Treasure
31 - Andy McKee - Ebon Coast
32 - Ayume - Hana (Chillout Version)
33 - Blank & Jones - Chilled Cream
If you noticed the TrackID was appended to. My solution on my script is to kill mpd and restart it. Not sure if mpc clear
is missing anything or this behavior is by design.
Music Player Daemon 0.20.8
mpd version: 0.20.0
OS: 4.10.13-1-ARCH
Thanks
Dave
I've got a library of songs which seems to update when new files are created, but for some reason, mpc update doesn't remove old songs that are no longer in the folder.
As an example, none of the following relative paths are valid in the file system when browsing via cd/lis:
iTunes/iTunes Media/Music/Gorillaz/Gorillaz/01 Re-Hash.m4a
iTunes/iTunes Media/Music/Gorillaz/Gorillaz/02 5_4.m4a
iTunes/iTunes Media/Music/Gorillaz/Gorillaz/03 Tomorrow Comes Today.m4a
iTunes/iTunes Media/Music/Gorillaz/Gorillaz/04 New Genious (Brother).m4a
iTunes/iTunes Media/Music/Gorillaz/Gorillaz/05 Clint Eastwood.m4a
iTunes/iTunes Media/Music/Gorillaz/Gorillaz/06 Man Research (Clapper).m4a
iTunes/iTunes Media/Music/Gorillaz/Gorillaz/07 Punk.m4a
iTunes/iTunes Media/Music/Gorillaz/Gorillaz/08 Sound Check (Gravity).m4a
iTunes/iTunes Media/Music/Gorillaz/Gorillaz/09 Double Bass.m4a
iTunes/iTunes Media/Music/Gorillaz/Gorillaz/10 Rock The House.m4a
iTunes/iTunes Media/Music/Gorillaz/Gorillaz/11 19-2000.m4a
iTunes/iTunes Media/Music/Gorillaz/Gorillaz/12 Latin Simone.m4a
iTunes/iTunes Media/Music/Gorillaz/Gorillaz/13 Starshine.m4a
iTunes/iTunes Media/Music/Gorillaz/Gorillaz/14 Slow Country.m4a
iTunes/iTunes Media/Music/Gorillaz/Gorillaz/15 M1 A1.m4a
iTunes/iTunes Media/Music/Gorillaz/Gorillaz/16 Clint Eastwood (Ed Case Mix).m4a
iTunes/iTunes Media/Music/Gorillaz/Gorillaz/17 19-2000 (Soulchild Remix).m4a
It would be nice if seek would understand track limits and seek through the playlist until the desired time (forward or backward) is reached. Right now, seek only works within a track, and if the user asks to seek a too large offset, nothing happens (or glitches). At least, skipping to next or previous would make sense.
As a user, I interact with my music with keyboard shortcuts for "mpc seek +0:00:30", -30 s, or +-5 min. I would like to be able to skip forward 5 min within an album even if it is split into shorter tracks, and I would like to be able to skip backwards 30 s to listen again to the end of the previous track.
mpc --host="@mpd"
says
mpd error: Failed to resolve host name
I have to execute
env MPD_HOST="@mpd" mpc
Hi,
I own a Korg Nanocontrol, which is perfect to control mpd (play, pause, next, ...). A litte bash script, aseqdump & mpc: https://paste.pound-python.org/show/TwdNe94LUzo4TejR0Dlc/
I would like to set the rating by the Nanocontrol too, may you add the ability to mpc? like: 'mpc rate [<0-5>]
'
Greetings
Richard
versions:
arch linux
mpd v0.20.20
mpc v0.30
problem:
running mpc lsplaylists
throws error mpd error: Response line too large
and nothing else happens. Have six playlists in one folder. Will be happy to provide more details, not sure what else would be helpful.
Hello,
I have a MPD installed on a Raspberry Pi and a MPC on my Mac. I managed to play a track by using the cmd $mpc play
. But when I executed $mpc next
, I got a MPD error: Timeout
. Could you give me a clue on this?
Thanks
Hey, in some cases the "mpc status" command says "[playing] #1/1 7:05/0:00 (0%)
" but the time (7:05) doesnt count more and no music is playing.
The help says that I can use mpc list any
, but this throws an error:
[pi@raspberry ~]$ mpc list foo
"foo" is not a valid search type: <any|Artist|Album|AlbumArtist|Title|Track|Name|Genre|Date|Composer|Performer|Comment|Disc|MUSICBRAINZ_ARTISTID|MUSICBRAINZ_ALBUMID|MUSICBRAINZ_ALBUMARTISTID|MUSICBRAINZ_TRACKID>
volume: 77% repeat: off random: off single: off consume: off
[pi@raspberry ~]$ mpc list any
mpd error: invalid type specified
My system:
[pi@raspberry ~]$ dpkg --list | egrep "mp[cd]"
ii libmpc3:armhf 1.0.3-1 armhf multiple precision complex floating-point library
ii libmpcdec6:armhf 2:0.1~r495-1 armhf MusePack decoder - library
ii libmpdclient2 2.9-1 armhf client library for the Music Player Daemon
ii libmpdec2:armhf 2.4.2-1 armhf library for decimal floating point arithmetic (runtime library)
ii mpc 0.28-1 armhf command-line tool to interface MPD
ii mpd 0.19.21-1 armhf Music Player Daemon
[pi@raspberry ~]$ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"
NAME="Raspbian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
I would like to change the format used by mpc to also include the '%position%'
format specifier when performing mpc playlist
in order to be able to use mpc play <position>
. This can be achieved by setting the MPC_FORMAT
environment variable to something along the lines %position%: [[[%artist% - ]&[%title%]]|[%file%]]
.
Unfortunately, doing so breaks the mpc ls | mpc add
combination as mpc ls
will also pickup this format. If MPC_FORMAT
is unset a different default format seems to be used for mpc playlist
and mpc ls
.
I would suggest one of the following solutions:
MPC_FORMAT
in mpc ls
MPC_FORMAT_LS
, MPC_FORMAT_PLAYLIST
, MPC_FORMAT_CUR
, …)mpc ls
default to format %file%
when standard out is not a tty.When compiling for Void Linux with the new meson build system it tries to install the manapges on /usr/share/man/man1/man
Package tree
masterdir/destdir/mpc-0.29/
├── rdeps
├── shlib-requires
└── usr
├── bin
│ └── mpc
└── share
├── bash-completion
│ └── completions
│ └── mpc
├── doc
│ └── mpc
│ ├── AUTHORS
│ ├── COPYING
│ ├── NEWS
│ ├── README.rst
│ ├── contrib
│ │ ├── mpc-completion.bash
│ │ ├── mpd-m3u-handler.sh
│ │ └── mpd-pls-handler.sh
│ └── html
│ ├── _sources
│ │ └── index.rst.txt
│ ├── _static
│ │ ├── ajax-loader.gif
│ │ ├── alabaster.css
│ │ ├── basic.css
│ │ ├── comment-bright.png
│ │ ├── comment-close.png
│ │ ├── comment.png
│ │ ├── custom.css
│ │ ├── doctools.js
│ │ ├── down-pressed.png
│ │ ├── down.png
│ │ ├── file.png
│ │ ├── jquery-3.1.0.js
│ │ ├── jquery.js
│ │ ├── minus.png
│ │ ├── plus.png
│ │ ├── pygments.css
│ │ ├── searchtools.js
│ │ ├── underscore-1.3.1.js
│ │ ├── underscore.js
│ │ ├── up-pressed.png
│ │ ├── up.png
│ │ └── websupport.js
│ ├── genindex.html
│ ├── index.html
│ ├── objects.inv
│ ├── search.html
│ └── searchindex.js
└── man
└── man1
└── man
└── mpc.1
14 directories, 40 files
Hi. I am suggesting -f, --format
to be updated with more metadata delimiters and/or to print a list of all information... or to have all information exposed in selective --query
for scripting purposes because there are some things in mpc status
that are not exposed in --format
.
Missing:
%state%
eg play, pause, stop%volume%
volume percent number, eg 10%repeat%
repeat boolean%random%
repeat boolean%single%
single boolean%consume%
consume boolean%shuffle%
shuffle boolean%progress%
song percent number, eg 10%length%
track lengthOther things that you might be able to print...
%time_total%
(seconds)%time_elapsed%
(seconds)%time_left%
(seconds)%playlist_total%
%playlist_elapsed%
%playlist_left%
%duration%
(seconds)%error%
error message?%bitrate%
If you want a comparsion, you can try...
moc
mocp --format
-- Selective metadata delimiters
mocp --info
-- Print (partial?) player status information
cmus
cmus-remote --query
: Print (partial?) player status information
deadbeef
deadbeef --nowplaying "%a - %t"
Print (partial?) status information (deprecated)
deadbeef --nowplaying-tf "%artist% - %title%"
uses a subset of FooBar2K
title formatting
To explain a bit more about --query
, this is simply borrowed from what I think is a best example from nvidia_smi --query-gpu=arg1, arg2, arg3
as it would allow mixing of song information and other information such as mpc stats
or version. This is basically a generic --format
that displays literally everything.
eg...
mpc --query version, song_artist, stat_artists, stat_albums, stat_songs, stat_play_time, stat_uptime, stat_db_updated, stat_db_play_time
... would return: `0.19.0, MaxKellermann, 1, 0, 1, 123456, 123456, ...`
Reason for making this issue. I want to obtain %status%
and did not see a way to do that with mpc
(other than ugly parsing the output of mpc status
) so I write up this possible feature/feature request issue. Thank you.
When I search for artist, genre or title – attribute doesn't matter – format %position% always prints out 1. The search result with default or any other formatting does work, e.g. genre, title, artist. My intention was to delete a list of titles from the queue. The only workaround is with cat -n: mpc playlist | cat -n | grep 'Marlene Dietrich' | awk '{print $1}' | mpc del.
Installation on Gentoo, regular packages: mpd-0.21.16, 0.31. Does it help to upgrade to mpd-0.21.18/ mpc-0.33?
Debian testing x64, gcc version 10.0.1 20200211 (experimental) (Debian 10-20200211-1)
$ ninja -C output
ninja: Entering directory `output'
[21/23] Compiling C object 'mpc@exe/src_search.c.o'.
../src/search.c: In function ‘get_search_type’:
../src/search.c:48:10: warning: implicit conversion from ‘enum <anonymous>’ to ‘enum mpd_tag_type’ [-Wenum-conversion]
48 | return SEARCH_TAG_ANY;
| ^~~~~~~~~~~~~~
../src/search.c:51:10: warning: implicit conversion from ‘enum <anonymous>’ to ‘enum mpd_tag_type’ [-Wenum-conversion]
51 | return SEARCH_TAG_URI;
| ^~~~~~~~~~~~~~
../src/search.c:54:10: warning: implicit conversion from ‘enum <anonymous>’ to ‘enum mpd_tag_type’ [-Wenum-conversion]
54 | return SEARCH_TAG_BASE;
| ^~~~~~~~~~~~~~~
[23/23] Linking target mpc.
Now that mpd supports transferring cover art, it would nice if mpc could implement this somehow. I realize it won't be able to display it, but perhaps there could be an option to download it and save it to disk?
It'd be nice to have the ability to do "not"-searches, like get a list of tracks that aren't a particular genre.
Hi
I really like Mpc, it works great. It shows the current playing song from a station when streaming but it would be much nicer if there is a way to also provide the station url and the name when mpc status is fried if an internet stream is playing on the Mpd instance.
thanks
When I connect to mpd via netcat, I know it's possible to run a command that will list all of my albums and group them by artist (list album group artist
), an example is shown right here in the mpd documentation.
Am I able to reproduce this behavior when using mpc? I'm not sure if I just haven't figured it out or if it's simply a limitation of the client itself.
Using MPC for bash scripting and it has been good for me, I'd like to know what are Channels and messages (e.g. mpc waitmessage) and how they can help me.
for example, currently I use loop in order to know when playback has been stop using mpc status + grep - it would be great if a single command would do that
In zsh, if I type:
mpc add Electronic/Las<tab>
mpc add Electronic/Laserkraft\ 3D/<tab>
mpc add Electronic/Laserkraft\ 3D/mpd error: No such directory
It seems to have a problem with spaces. What I see is that mpc tab "Electronic/Laserkraft 3D/"
and mpc tab Electronic/Laserkraft\ 3D/
work, but mpc tab "Electronic/Laserkraft\ 3D/"
leads to that error. Perhabs mpc tab could be made to treat \<space>
as regular space. Otherwise perhaps https://github.com/zsh-users/zsh/blob/master/Completion/Unix/Command/_mpc needs to be changed.
I am running mpc 0.28 and zsh 5.4.1.
toggleoutput command was added in 0.24 but there doesnt seem to be a mention of it in the manpage..
Using this as a CLI for daapd and it works very well! Are there plans to enable volume adjustment per output? daapd supports this, but it doesn't appear that the mpc command.c allows this.
Thanks!
This would seem to suggest that this is included in the protocol, so I think it'd be great if mpc also supported this to make it easier to script some things.
mpc listneighbors
is in the mpd documentation, but does not actually exist yet.
mpc currently does not appear to provide any return code, so scripts have no idea if the command succeeded or not. Primarily in the case of mpd not running, but other errors returning a non-0 value would be nice too.
Currently working around this by looking for version and assuming an empty string means mpd is not available, but that's a bit kludgy. If mpc just returned non-zero it would be a better way to determine if mpd is available or not.
Hi,
After reading man mpc in section metadata delimiter it'd be nice to add new values :
Using the %file%
argument for the --format
option prints out the path of the music file relative to the mpd music directory, as a user I'd like an option to print the absolute path of the music file.
example ~/D/Music/Alice In Chains/[1992] Dirt (Original Version)/13 - Would.mp3
instead of Alice In Chains/[1992] Dirt (Original Version)/13 - Would.mp3
Example output:
# mpc
Hum - The Very Old Man
[paused] #1/1 2:13/0:00 (0%)
volume:100% repeat: off random: off single: off consume: on
I have uploaded the opus file here in case you want to test: https://transfer.sh/xLz9c/opus_file.zip
Let me know if sharing the song is problematic because of copyright issues or better yet just delete the issue yourself. :)
status command is able to display current elapsed time:
[playing] #1/8 0:28/4:32 (10%)
but not possible with -f
.
i want to script this in my web script to refresh page when the song playing has ended. i.e setup "Refresh: $seconds" http header.
The purpose of "name" in the metadata format is described as "Unknown (doesn't produce output)".
I don't know if this is the intended use of the tag, but an IceCast server I'm currently connected to (chiru.no:8080) sets this to "chiru.no ogg" (I'm currently listening to the ogg stream, they stream in several formats which I think is just pure insanity really).
Anyway, I don't really know what you should do about this, maybe investigate a couple of internet music streams and see whether this is consistent? It'd probably be handy to somebody else if this were the case, because %file% is just way too long to be that helpful.
there's no tool like mpc...no android client has been good enough for me
please provide/help me build mpc for android arm64
Thank you
Not sure how much of is an actual issue or a question but here it goes:
I'm passing through ncat (but also tried telnet and nc) 2 commands: idle player
and stop
the principal is to "dump" the commands on the server and forget about it, the server should wait until the songs end (idle playlist
) and then stop (stop
). For an example I could set these commands and leave the house and still be reassured that MPD will stop when the song will end.
so far I tried the following from the command line, but nothing happens, also I tried different variation of the idle
command such as idle mixer
, but still failed
echo -e "idle playlist\nstop" | ncat MYMPDSERVER 6600
echo -e "idle\tplaylist\nstop" | ncat MYMPDSERVER 6600
echo -e "command_list_begin\nidle playlist\nstop\ncommand_list_end" | ncat MYMPDSERVER 6600
echo -e "command_list_begin\nidle\tplaylist\nstop\ncommand_list_end" | ncat MYMPDSERVER 6600
MPD 0.21.11
Is there a way I can switch to next track so that it will be random when I have random order on? mpc next/prev switches to the next track in the playlist, in order.
Edit
Ok, it doesn't. Everything is fine
I just found mpc sticker
command by reading the source code of an mpd client. But I can't find documention on this one beside the usage line printed on the terminal.
I am updating the mpc package in Buildroot to latest version 0.29. When testing the build using latest Meson (version 0.45) the following warning is thrown:
WARNING: -Wl,--gc-sections looks like a linker argument, but has_argument
and other similar methods only support checking compiler arguments.
Using them to check linker arguments are never supported, and results
are likely to be wrong regardless of the compiler you are using.
Upstream issue about the warning: mesonbuild/meson#2971
Oct 6 15:07:59 ab audit: USER_AUTH pid=5506 uid=1000 auid=1000 ses=1 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:authentication grantors=pam_unix acct="9gkm4" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success'
Oct 6 15:07:59 ab audit: USER_ACCT pid=5506 uid=1000 auid=1000 ses=1 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:accounting grantors=pam_unix,pam_localuser acct="9gkm4" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success'
Oct 6 15:07:59 ab audit: USER_CMD pid=5506 uid=1000 auid=1000 ses=1 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='cwd="/home/9gkm4" cmd=73797374656D63746C207374617274206D7064 terminal=pts/0 res=success'
Oct 6 15:07:59 ab audit: CRED_REFR pid=5506 uid=0 auid=1000 ses=1 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:setcred grantors=pam_unix acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success'
Oct 6 15:07:59 ab audit: USER_START pid=5506 uid=0 auid=1000 ses=1 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:session_open grantors=pam_keyinit,pam_limits,pam_keyinit,pam_limits,pam_systemd,pam_unix acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success'
Oct 6 15:07:59 ab systemd: Starting Music Player Daemon...
Oct 6 15:07:59 ab audit: SELINUX_ERR op=security_bounded_transition seresult=denied oldcontext=system_u:system_r:init_t:s0 newcontext=system_u:system_r:mpd_t:s0
Oct 6 15:07:59 ab audit: AVC avc: denied { append } for pid=5512 comm="mpd" name="mpd.log" dev="dm-1" ino=1315238 scontext=system_u:system_r:init_t:s0 tcontext=unconfined_u:object_r:mpd_log_t:s0 tclass=file permissive=0
Oct 6 15:07:59 ab mpd: exception: failed to open log file "/var/log/mpd/mpd.log" (config line 37): Permission denied
Oct 6 15:07:59 ab systemd: mpd.service: Main process exited, code=exited, status=1/FAILURE
Oct 6 15:07:59 ab systemd: Failed to start Music Player Daemon.
Oct 6 15:07:59 ab audit: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=mpd comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'
Oct 6 15:07:59 ab systemd: mpd.service: Unit entered failed state.
Oct 6 15:07:59 ab systemd: mpd.service: Failed with result 'exit-code'.
Oct 6 15:07:59 ab audit: USER_END pid=5506 uid=0 auid=1000 ses=1 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:session_close grantors=pam_keyinit,pam_limits,pam_keyinit,pam_limits,pam_systemd,pam_unix acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success'
Oct 6 15:07:59 ab audit: CRED_DISP pid=5506 uid=0 auid=1000 ses=1 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:setcred grantors=pam_unix acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success'
whenever I use priority with mpc, I need to calculate the song position and deduct 1 from it as priority relates to the first song in the queue as 0 while position starts with 1
mpc prio 1 <pos>
to queue the same song as mpc play <pos>
would play
mpc prio 1 <pos>
== mpc play (<pos> - 1)
> mpc --host='@mpd'
mpd error: Failed to resolve host name
> env MPD_HOST="@mpd" mpc
volume: 24% repeat: off random: off single: off consume: off
I suspect
Lines 300 to 311 in a4057a8
short version:
As a user I would like to list all the prioritzed songs in the queue (i.e. where prio > 0), preferably sorted by priority, as far as I understand there isn't a direct command to do it, currently I must do mpc -f "[%prio%]_[%position%] [%artist%] - [%title%]" playlist | grep -E '^[1-9]_'
Now that MPD supports the "originaldate" field, can we have MPC support it so we can do mpc -f "%originaldate%"?
At 100% volume mpc prints volume:100%
. At <=99% volume we get volume: xx%
(with a space).
This makes it unnecessarily hard to extract the volume with programs like awk.
Is there any reason why the volume is printed with
Line 92 in 4cb12fe
printf("volume: %3i%c ", mpd_status_get_volume(status), '%');
This also applies to the mpc volume
command:
Line 881 in da8df7e
I am able to template a format for json use, but if a field contains '
or "
, that breaks json.
Here's an example of the template I used, result includes data with unescaped "
:
mpc -f '{"artist": "%artist%",["album": "%album%",]"title": "%title%",["track_number": "%track%",]"duration": "%time%"}' search album streets
{"artist": "Savatage","album": ""Streets" A Rock Opera","title": "Believe","track_number": "16","duration": "5:42"}
A json option could be provided a list of fields to operate or just be an option that escapes quotes in its output regardless which fields are used in a template.
On one of my PCs, mpc takes too long to complete the request, but ncmpcpp works as usual.
I can’t understand why this is happening.
I performed mpc with "perf record -g mpc" and got this result:
And also I run mpc with time command:
╰─$ time mpc
MPD error: Connection refused
mpc 0.00s user 0.01s system 0% cpu 30.034 total
╰─$ time mpc
MPD error: Connection refused
mpc 0.00s user 0.01s system 0% cpu 30.036 total
╰─$ time mpc
MPD error: Connection refused
mpc 0.00s user 0.01s system 0% cpu 30.036 total
Do you have any suggestions?
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.